javascript string ends string code example Example: how to find out what a string ends with in javascript function isJS(path) { return /jsx?$/.test(path) }