Tim Green
Tim Green @humanin_theloop ·
What's the output of this JS code snippet? const arr = [1, 2, 3]; const result = arr.filter(x => x > 1).map(x => x * 2).reduce((a, b) => a + b, 0); console.log(result); #CodePuzzle #JavaScript #DevChallenge
1
84
Tim Green
Tim Green @humanin_theloop ·
Code puzzle! What does this JavaScript code output when run? ```javascript const obj = { a: 1 }; obj.b = obj; console.log(obj.b === obj); console.log(JSON.stringify(obj)); ``` #CodePuzzle #JavaScript #DevChallenge
2
63