Juan Pablo Isaza
You're looking for Babel.
Babel will basically let you write modern JS code and then it can transpile it to "more primitive" code in order to run on a larger set of devices.
There are a bunch of options and a bunch of ways you can go about using it, but using the env preset and specifying your
targets is probably a good place to start.