Top "Ecmascript-5" questions

ECMAScript is the name of the Ecma International Standard 262.

how to stop Javascript forEach?

I'm playing with Node.js and Mongoose — trying to find specific comment in deep comments nesting with recursive function and …

javascript ecmascript-5
Get array of object's keys

I would like to get the keys of a JavaScript object as an array, either in jQuery or pure JavaScript. …

javascript ecmascript-5
What is the purpose of the var keyword and when should I use it (or omit it)?

NOTE: This question was asked from the viewpoint of ECMAScript version 3 or 5. The answers might become outdated with the introduction …

javascript keyword ecmascript-5
How to implement private method in ES6 class with Traceur

I use Traceur Compiler to have advantage with ES6 features now. I want to implement this stuff from ES5: function …

javascript class ecmascript-5 ecmascript-6 traceur
Why are Objects not Iterable in JavaScript?

Why are objects not iterable by default? I see questions all the time related to iterating objects, the common solution …

javascript arrays iterator ecmascript-6 ecmascript-5
What does [].forEach.call() do in JavaScript?

I was looking at some snippets of code, and I found multiple elements calling a function over a node list …

javascript arrays foreach ecmascript-5 nodelist
Dynamically set property of nested object

I have an object that could be any number of levels deep and could have any existing properties. For example: …

javascript ecmascript-5
Getting Error Promise is undefined in IE11

I am converting React code to typescript, target in tsconfig is es5. on running in IE 11 i get an error "…

javascript reactjs typescript ecmascript-5 polyfills
Javascript Reduce an empty array

When I reduce the array, I am trying to get the number zero, but I dont clearly understand the behaviour …

javascript arrays ecmascript-5
gulp babel, exports is not defined

Consider the following example code (and maybe I am doing it wrong?) var FlareCurrency = { }; export {FlareCurrency}; I have the following …

javascript gulp ecmascript-6 babeljs ecmascript-5