String.prototype.charCodeAt() vs String.prototype.concat()
String.prototype.charCodeAt() and String.prototype.concat() are both JavaScript String APIs, and choosing between them is a common point of confusion. This page compares their syntax, parameters, return values, and typical use cases so you can pick the right one. String.prototype.charCodeAt(): Returns the Unicode value of the character at the specified index. Its syntax is str.charCodeAt(index). String.prototype.concat(): Concatenates strings together. Its syntax is str.concat(str2, ..., strN). Example of String.prototype.charCodeAt(): "A".charCodeAt(0) // 65. Example of String.prototype.concat(): "Hello ".concat("World") // "Hello World". Read the full references for String.prototype.charCodeAt() and String.prototype.concat() to see edge cases, time complexity, browser support, and the mistakes developers most often make with each. Other String APIs worth comparing: String.prototype.charAt(), String.prototype.includes(), String.prototype.indexOf(), String.prototype.lastIndexOf(), String.prototype.match(), String.prototype.matchAll(). Both belong to the String category in the JS Reference documentation, which covers 35 entries in total. Try both in the JavaScript playground to see the behavioral difference live.