Login and Register ×
Check your Email for the OTP
JavaScript MCQ Javascript String MCQ
⚠ Report ✓ Question Verified Copy Link
const str = 'Hello, world!'; console.log(str.charAt(0));
Explanation:
The charAt() method returns the character at a specified index in a string. In this case, the index is 0, so the method returns the first character of the string, which is 'H'.
charAt()
Related Topic:
Share Above MCQ
Learn More MCQ Questions from JavaScript MCQ Javascript String MCQ