javascript ends with string code example
Example 1: javascript endswith
"Hello world".endsWith("world");//true
"Hello world".endsWith("Hello");//false
Example 2: how to find out what a string ends with in javascript
function isJS(path) {
return /jsx?$/.test(path)
}