Glossary Term
String.prototype.endsWith()
The endsWith() method of String values determines whether a string ends with the characters of this string, returning true or false as appropriate.
This method lets you determine whether or not a string ends with another string. This method is case-sensitive.
Return value: true if the given characters are found at the end of the string, including when searchString is an empty string; otherwise, false.
Parameters: searchString The characters to be searched for at the end of str. Cannot be a regex. All values that are not regexes are coerced to strings, so omitting it or passing undefined causes endsWith() to search for the string “undefined”, which is rarely what you want. endPosition The end position at which searchString is expected to be found (the index of searchString’s last character plus 1). Defaults to str.length.
Syntax example: endsWith(searchString)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
