Archive
- #44: replace() vs replaceAll()strings · ★★
- #43: 'abc'.split('') vs 'abc'.split()strings · ★
- #42: slice then splice on the same arrayarrays · ★★
- #41: arr.flat() vs arr.flat(Infinity)arrays · ★
- #40: delete arr[1]arrays · ★★★
- #39: arr.sort() === arrarrays · ★★
- #38: s[0] = 'X' on a stringstrings · ★
- #37: Array(3).fill(0) vs Array(3).map(...)arrays · ★★
- #36: [10, 9, 1].sort()arrays · ★
- #35: parseInt('0x1F') and parseInt(' 42abc')numbers · ★★
- #34: parseInt('08')numbers · ★
- #33: ['1','2','3'].map(parseInt)arrays · ★★★
- #32: Number.isNaN('abc') and Number.isNaN(NaN)numbers · ★★
- #31: isNaN('abc')numbers · ★
- #30: Array(3).length and Array(3) + ''arrays · ★★
- #29: 2 ** 3 ** 2numbers · ★
- #28: -7 % 3 and 7 % -3numbers · ★★
- #27: Infinity - Infinitynumbers · ★
- #26: '5' + 3 - 2coercion · ★★★
- #25: A custom valueOf() in == comparisonscoercion · ★★
- #24: Boolean(' ') vs Boolean('')coercion · ★
- #23: (0.1+0.2).toFixed(2) and (1.005).toFixed(2)numbers · ★★
- #22: let x = '5'; x++numbers · ★
- #21: '5' + 3 vs '5' - 3coercion · ★★
- #20: 5.9 | 0numbers · ★
- #19: -0 === 0 vs Object.is(-0, 0)numbers · ★★★
- #18: String(null) vs null.toString()coercion · ★★
- #17: 1 < 2 < 3misc · ★
- #16: `${[1,2,3]}` and `${{}}`strings · ★★
- #15: !![]coercion · ★
- #14: +[], +[5], +[5,6]coercion · ★★
- #13: +'42px'coercion · ★
- #12: MAX_SAFE_INTEGER + 1 === MAX_SAFE_INTEGER + 2numbers · ★★★
- #11: typeof NaN and typeof Infinitymisc · ★★
- #10: typeof function(){}misc · ★
- #9: '0' == false vs '0' == ''coercion · ★★
- #8: [] == falsecoercion · ★
- #7: null == undefinedcoercion · ★★
- #6: Promise vs setTimeout orderingasync · ★★
- #5: var in a setTimeout loopclosures · ★★
- #4: [] + {}coercion · ★★
- #3: 1 + '2' + 3coercion · ★
- #2: 0.1 + 0.2 === 0.3numbers · ★
- #1: typeof nullmisc · ★