You query the language runtime for the version and use it as an assert. It's standard everywhere, except in the web where polyfills are still a thing.