DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
how to compare a string with its ending in javascript
function solution(str, ending){ return str.indexOf(ending, str.length - ending.length) !== -1; }
PREVIOUS
NEXT
Tagged:
#compare
#string
#javascript
ADD COMMENT
Topic
COMMENT
Name
7+5 =
Submit