javascript string beginsWith code example
Example 1: javascript endswith
"Hello world".endsWith("world");//true
"Hello world".endsWith("Hello");//false
Example 2: js startswith
var str = "Hello world, welcome to the universe.";
var n = str.startsWith("Hello");