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.