132k views
1 vote
Assume courseTitle ="Principles in Information Technology and Computation";

Write a JavaScript statement to find the third character courseTitle.

User Kafuchau
by
8.1k points

1 Answer

6 votes

Answer:

var courseTitle ="Principles in Information Technology and Computation";

var result =courseTitle .charAt(2);

Step-by-step explanation:

Following are the code of javascript code that read the 3 character

var courseTitle ="Principles in Information Technology and Computation";

var result =courseTitle .charAt(2);

document.write(result) ;

The charAt method return the character at the specified position in the string.We can just give the index number in which we find the character at the specified position .

User Aloy A Sen
by
8.3k points