find end of string nodejs code example
Example 1: javascript endswith
"Hello world".endsWith("world");//true
"Hello world".endsWith("Hello");//false
Example 2: endswith()
var str = "Hello world, welcome to the universe.";
var n = str.endsWith("universe.");//returns true