JavaScript(or JS) enables users to create interactive webpages and is an essential code to learn for websites and web applications. Most modern websites use JavaScript.
The JavaScript Reference serves as library to define various JS elements such as arrays, date, json, math, operators and regular expressions (regexp) to help you build your website.
JavaScript Strings
JavaScript strings store characters like "Apple iPhone X".
For Example:
var phonemodel = "Apple iPhone X";
var phonemodel = 'Samsung S9';
NAME
DESCRIPTION
CATEGORY
charAt()
Returns the character at the specified position
Methods
charCodeAt()
Returns the Unicode of the character at the specified position
Methods
concat()
Concatenate. Joins two or more strings together. For example = FirstName + LastName.
Methods
endsWith()
Checks if string ends with specified string or characters
Methods
fromCharCode()
Converts Unicode values to characters
Methods
includes()
Checks whether a string contains the specified string or characters
Methods
indexOf()
Returns the position of the first occurrence of a specified value in a string
Methods
lastIndexOf()
Returns the position of the last occurrence of a specified value in a string
Methods
localeCompare()
Compares two strings in the current locale
Methods
match()
Searches a string for a match against a regular expression, and returns the matches