A

Admin • 833.24K Points
Coach

Q. How to find the first occurrence of 'e' in the string "hello"?

  • (A) indexOf('e')
  • (B) find('e')
  • (C) charAt('e')
  • (D) get('e')

Explanation by: Admin

indexOf() returns the index of the first occurrence of the specified character.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.