starts -> ends

The endsWith() method returns true if a string ends with a specified string. Otherwise it returns false.
pull/237/head
Orkhan 4 years ago committed by GitHub
parent 97f84bf65f
commit 49d888906e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
// endsWith: it takes a substring as an argument and it checks if the string starts with that specified substring. It returns a boolean(true or false).
// endsWith: it takes a substring as an argument and it checks if the string ends with that specified substring. It returns a boolean(true or false).
// string.endsWith(substring)
let string = 'Love is the best to in this world'
console.log(string.endsWith('world')) // true

Loading…
Cancel
Save