Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

confirming the end javascript

function confirmEnding(str, target) {
  return str.slice(str.length - target.length) === target;
}

confirmEnding("He has to give me a new name", "name");
 
PREVIOUS NEXT
Tagged: #confirming #javascript
ADD COMMENT
Topic
Name
1+8 =