Here is the summary of String Methods in JavaScript with the purpose for your quick reference.
| Num | Methods | Examples | Links(Mozilla) |
|---|---|---|---|
| 1 | .fromCharCode() |
String.fromCharCode(65, 66, 67); // "ABC"
|
Link |
| 2 | .charAt() |
var anyString = 'AB';
console.log(anyString.charAt(0)); //'A'
console.log(anyString.charAt(1)); //'B'
|
Link |
| 3 | .charCodeAt() |
'ABC'.charCodeAt(0); // returns 65
|
Link |
| 4 | .concat() |
var hello = 'Hello, ';
console.log(hello.concat('Kevin', ' have a nice day.'));
/* Hello, Kevin have a nice day. */
|
Link |
| 5 | .endsWith() |
var str = 'To be, or not to be, that is the question.';
|