To answer the question directly - no, you cannot because of compatibility issues, as @suraj kindly reminded us.
Having said that in modern JS development you are unlikely to use it var
, since let
they const
have obvious advantages, in addition to some specific applications var
, they will use either BabelJS, TypeScript or even now Webpack 2 to convert the code for backward compatibility, since the production code will be sent to vanilla js. Modern IDEs such as WebStorm will by default embed var
in ES6 mode to change them to let
.
, JS, , let
const
ES6, . - .