Multiple choice javascript

How do you read the first character in a string ?

  1. stringName.charAt(0);

  2. stringName.substring(1);

  3. stringName.charAt(1);

  4. stringName.charAt(2);

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

charAt(0) returns the first character in a string because indexing starts at 0. charAt(1) would return the second character.