Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!

Question list filters

Filter by
Sorted by
Tagged with
Filter by Employee ID
Best practices
0 votes
7 replies
223 views

When implementing the parasitic combination inheritance pattern in ES5, almost every resource (including Nicholas Zakas' book) insists on fixing the constructor property like this: function ...
Score of 2
1 answer
136 views

I have a Scheme interpreter written in JavaScript called LIPS, and I have a define-class macro which is using the ES5 prototype system. But I have a problem in creating super(). I'm trying to create a ...
Score of 0
3 answers
148 views

Given a JSON object which contains tags identified by {{, I need to find all matches in the payload and replace them. The following code works, but only returns the 1st match, and if I turn on the gim ...
Score of 0
1 answer
63 views

I'm attempting to put together a basic test framework for a number of JS scripts that I've been provided. These all run on nashorn (JDK 11) without issue in their original habitat. I'm attempting to ...
Score of 0
0 answers
109 views

I'm coding a type-safe class system using ES5 and JSDoc. At the most basic level, the problem boils down to adding a property to the constructor's returned instance type, while preserving the type ...
Score of 0
1 answer
145 views

I wont to do I want to transpile TypeScript code with Private Class Fields to ES5 like when using TypeScript's private identifier. (I give up one or the other, it will be resolved soon. But I don't ...
Score of 1
1 answer
223 views

Working on a web app for a specialized device that runs Android 10 (Webview uses Chromium <80). When I try to serve the app and test on the Android device, I get errors for using optional chaining ...
Score of 1
0 answers
154 views

I have a doubt regarding, how hooks like useCallback() work when the variables, arrow functions, and states used in it and its dependency, are declared before and after the useCallback(). Note: The ...
Score of 1
1 answer
73 views

I was going through "JavaScript the definitive guide" and I encountered this auxiliary constructor (below their Set definition): // Definition of Set, taken from chapter 9.6.1 function ...
Score of 1
1 answer
154 views

I would like to transpile JS code which uses the Node 'buffer' to pure ES5 so it can run on Duktape (with Webpack and Babel). The code has been simplified in a test.js, which uses buffer and console: ...
Score of 0
0 answers
35 views

I am trying to write logic in ES5 (in BIRT) to assess if an employee has worked 10 days in a row. I have extracted the start dates but can't seem to get the logic to work as intended. If an employee ...
Score of 0
1 answer
144 views

In the project settings, you're able to set "ECMA Script" between nothing, "ECMA Script 5" and "ECMA Script 6". But I'm really confused as to what this actually does. I'...
Score of 1
0 answers
173 views

I have an app that I built using create react app. I just found out that it needs to support a very old browser (chrome 37). I was under the impression that by default create react app uses babel to ...
Score of 0
2 answers
283 views

In ES6 there is .constructor.name which can be used on any object to get its class name. Is there something in ES5 that can do that? (Note: Before commenters mention to upgrade the browser, etc., this ...
Score of 0
2 answers
83 views

Currently I have the following code - var questions = ['1', '2', '3', '4', ..., 'n']; var qAsked = []; // array of indexes of already asked questions // the code below is executed multiple times if (...

15 30 50 per page
1
2 3 4 5
125