Archive
- #100: Object.freeze and a nested objectobjects · ★★
- #99: ?? vs || with 0 and empty stringmisc · ★
- #98: {...original} and a nested objectobjects · ★★
- #97: delete on an existing vs missing keyobjects · ★
- #96: instanceof after Foo.prototype = {}prototypes · ★★★
- #95: Object.keys with numeric-looking keysobjects · ★★
- #94: const obj, mutated propertiesobjects · ★
- #93: obj[{}] = 1objects · ★★
- #92: () => ({ a: 1 })scope · ★
- #91: typeof on an undeclared name vs a TDZ namehoisting · ★★
- #90: A parameter with the same name as an outer variablescope · ★
- #89: A plain function nested inside a methodthis · ★★★
- #88: break outer from inside a nested loopscope · ★★
- #87: Changing a property of a const objectobjects · ★
- #86: return followed by a newline and an objectmisc · ★★
- #85: let x in a nested blockscope · ★
- #84: A function expression's own namescope · ★★
- #83: let x = (1, 2, 3)misc · ★
- #82: A function and a var sharing a namehoisting · ★★★
- #81: Default parameters and an outer variablescope · ★★
- #80: Recursion after the outer variable is nulledclosures · ★
- #79: Calling regular vs arrow with .callthis · ★★
- #78: f.length with a default and a rest parammisc · ★
- #77: Pulling a method off its objectthis · ★★
- #76: sum.call vs sum.applythis · ★
- #75: Mutating arguments[0]scope · ★★★
- #74: An arrow property vs a methodthis · ★★
- #73: A variable declared inside an IIFEscope · ★
- #72: Two counters from the same factoryclosures · ★★
- #71: Calling a function before it is definedhoisting · ★
- #70: let in a setTimeout loopclosures · ★★
- #69: Reading a let variable before its linehoisting · ★
- #68: Binding an already-bound function againthis · ★★★
- #67: A function declared inside an if blockhoisting · ★★
- #66: Logging a var before its declarationhoisting · ★
- #65: Calling a var-assigned function before its linehoisting · ★★
- #64: typeof vs Array.isArraymisc · ★
- #63: forEach vs map on a sparse arrayarrays · ★★
- #62: 'hello world'.slice(-5, -1)strings · ★
- #61: Number() on arrayscoercion · ★★★
- #60: [1,2] == '1,2' vs [1,2] == [1,2]arrays · ★★
- #59: arr.push(3)arrays · ★
- #58: '10' < '9' and localeComparestrings · ★★
- #57: split with a limit argumentstrings · ★
- #56: indexOf(NaN) vs includes(NaN)arrays · ★★
- #55: a.reverse() seen through another variablearrays · ★
- #54: split() with a capturing groupstrings · ★★★
- #53: charAt(5) vs at(-1)strings · ★★
- #52: 'ab'.repeat(0)strings · ★
- #51: Spreading an array of arraysarrays · ★★
- #50: Array.from({ length: 3 })arrays · ★
- #49: replace() with $&strings · ★★
- #48: padStart/padEnd with a short target lengthstrings · ★
- #47: [].reduce(...) with no initial valuearrays · ★★★
- #46: arr.length = 1 then arr.length = 4arrays · ★★
- #45: arr.flatMap(...)arrays · ★
- #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 · ★