operation performed on strings, including theconcatmethod, results in…
a new string
Concat can take ________ as arguments. it returns______
more than one strings.
all those strings combined into one
String.prototype.includes()
includesmethod takes a string as the argument and returns a boolean signifying whether that string exists within the string thatincludeswas called on.includesalso takes an optional second argument that specifies which index in the string to start looking for the substring.String.prototype.trim()
trimmethod removes whitespace from both ends of the string it’s called on.trimmethod is often useful when getting input from users, which can often contain unnecessary whitespace at either end.trimremoves any number of space characters as well as whitespace characters like\nand\t.String.prototype.charAt
ThecharAtmethod is nearly identical to using brackets on a string. It takes an index as an argument and returns the character at that index in the given string
The chief difference betweencharAtand[]occurs when using indices for characters that don’t exist:charAtreturns an empty string (‘’), while[]returns undefined:
String.prototype.charCodeAt
charCodeAtis similar tocharAt, but instead of returning the character at the given index, it returns theUnicode code pointorcharacter codeof the character at that index.charCodeAtassumes the index0.String.fromCharCode
String.fromCharCodemethod does the opposite ofString.prototype.charCodeAt. It takes a character code (Unicode code point) and returns the character represented by that character code.fromCharCodeis not a prototype method. It’s instead what we call astatic methodor a function. It can only be called from the string constructorString.prototype.endsWith()
undefinedcausesendsWith()to search for the string"undefined", which is rarely what you want.String.prototype.startsWith()
Same as endsWith but for starting position
String.prototype.repeat()