JavaScript-Garden icon indicating copy to clipboard operation
JavaScript-Garden copied to clipboard

A collection of documentation about the most quirky parts of the JavaScript language.

Results 40 JavaScript-Garden issues
Sort by recently updated
recently updated
newest added

setTimeout and setInterval can also take a string as their first parameter. ```javascript function foo() { // will get called } function bar() { function foo() { // never gets...

original line: `new Array(3); // Result: []` correct line `new Array(3); // Result: [ , , ]`

The `Array` constructor does not even have a property called `forEach`; now if the `#` convention were explained (useful in case many prototype methods are discussed), `Array#forEach` would be appropriate,...

waiting-for-pr

I thought that using the unary `+` operator, concatenating with the empty string, and use of the not operator were _implicit_, while the use of the `Number`, `String`, and `Boolean`...

It looks odd that in the Type column, only "number" is in orange, rather than red. I forget when this happened, but Nitro and V8 now return `"object"` instead of...

This is well-known but may also be considered an antipattern, especially because it cannot be encapsulated, and instead the constructor name must be updated in three places, and the argument...

**TL;DR:** It might be better to say they _act like_ getters and setters, with a footnote explaining they're even more exotic than that. The `length` property of an array, and...

**TL;DR**: In the section titled "`undefined` and `null`", "keyword of" should be "reserved word in", and in the section titled "Notation of Keys", all three uses of "keyword" should be...

Hi, I think this is a good thing to point out on the "The prototype" section. At least as a note on a side of "The first major difference is...

I was wondering, can we ask people who've made PRs previously to review new PRs in their language? We could put together a list of users who've made translations in...