Multiple choice general knowledge

What's wrong with this: var charConvert = toCharCode('x');

  1. toCharCode() is a bogus method

  2. Nothing. I use it all the time

  3. toCharCode accepts only numbers.

  4. toCharCode takes no arguments

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

In JavaScript, the correct method to get a character code is 'charCodeAt()', not 'toCharCode()'. The method 'toCharCode()' does not exist in standard JavaScript. This is a programming knowledge question testing knowledge of string manipulation methods.