how to check if a string ends in 4 random numbers javascript code example
Example 1: endswith()
var str = "Hello world, welcome to the universe.";
var n = str.endsWith("universe.");//returns true
Example 2: how to find out what a string ends with in javascript
function isJS(path) {
return /jsx?$/.test(path)
}