DEV Community

Discussion on: 10 Challenging JavaScript Quiz Questions and Answers

Collapse
 
cayhorstmann profile image
cayhorstmann

These are very nice questions that probe JavaScript fundamentals and not ephemeral trivia. I suggest you change #4 and #6 so that they don't require knowledge about the behavior of == vs. ===. (Nobody should use == with JavaScript in 2020.) If you think that makes #4 too easy, perhaps you could add whether Object.keys(obj).map(x => parseInt(x)) === Object.values(obj). And as a bonus puzzler, why isn't Object.keys(obj).map(parseInt) the same as Object.keys(obj).map(x => parseInt(x))?

Collapse
 
voiedev profile image
Charles Allen

Love the bonus question! That's quite the trap.