-1

How one can determine JS version using only js functions, without calls navigator/agent?

For example, codeforces.com has a JS as one of the possible languages for problem solutions, however, it uses outdated d8 instead of nodejs for some reasons. Since JS actively goes to the backend and becomes general purpose scripted language I guess this determination code can be somehow useful.

asked Mar 17, 2017 at 12:47
3
  • 1
    Note that the JavaScript version is not the same as the ECMAScript version. Commented Mar 17, 2017 at 12:50
  • Sicne the line between Javascript versions depends also on the browser used, it's probably better to use feature detection. Test for the existance of the features you want to use. Commented Mar 17, 2017 at 12:54
  • What exactly do you mean by "JS version"? Does it have anything to do with v8? Commented Mar 17, 2017 at 13:11

2 Answers 2

0

As far as i know nodeJS uses v8. (https://developers.google.com/v8/) there is a related topic here (Detect version of JavaScript)

answered Mar 17, 2017 at 12:51
Sign up to request clarification or add additional context in comments.

Comments

0

Feature detection is the way to go.

The reason is that all modern JavaScript implementations have adopted a development/release strategy where they work on new features in parallel and ship them when they are ready. So there is no (usually) no specific point in time where a given browser or node.js switches from "not supporting ES2017" to "supporting ES2017", it's more likely that they're in a state of "most ES2017 features are supported already but some are still missing or incomplete".

answered Mar 17, 2017 at 13:36

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.