Level 47
Level 49
14 words 0 ignored
Ready to learn
Ready to review
Ignore words
Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.
Ignore?
string.indexOf(substring);
returns the index of (the position of) the FIRST occurrence of a specified text in a string:
string.lastIndexOf(substring);
returns the index of (the position of) the LAST occurrence of a specified text in a string:
0
counts positions from
string.search(substring);
searching for a String in a String and returning the position
string.slice(start, end);
extracts a part of a string and returns the extracted part in a new string
string.substring(start, end);
extracts a part of a string and returns the extracted part in a new string // cannot accept negative indexes
string.substr(start, length);
extracts a part of a string and returns the extracted part in a new string // specifies the length of the extracted part
string.replace(old, new);
Replacing a specified value with a new value in a string
string.toLowerCase();
Converting a string to Upper case
string1.concat(string2);
Concatenating two or more strings
string.charAt(index);
Returning the character at a specified index in a string
string.charCodeAt(index);
Returning the unicode of the character at a specified index in a string
string.split(separator);
Converting a String to an Array
Hello.split(" "); // returns [H, e, l, l, o]
Converting a String "Hello" to an Array