2 ms·
The second question says "Select the proper order" but only lists single options, then when I clicked (thinking I was supposed to rearrange them) it just showed
by gatherhunterer 8y ago
The second question says "Select the proper order" but only lists single options, then when I clicked (thinking I was supposed to rearrange them) it just showed me the answer. From what I can tell it cannot be marked as correct or incorrect like the others. The use of the word "select" is confusing in that case.
While I realize these are toy problems, I would stay away from using "==" in an interview (or at all, unless you are contributing to a codebase that uses it). The reason is pretty clear from looking at the equality diagrams[1,2]. If you use "==" in an interview you should expect to be asked questions about how it works.
Will this evaluate to true? ( [1] == true )
How about this? ( [0] == true )
This one? ( [] == true )
This one? ( [[]] == true )
This one? ( undefined == null )
I would rather not spend my time in an interview talking about the JavaScript equality operator's Bizzaro World counterpart.
1. === chart https://i.stack.imgur.com/62vxI.png https://i.stack.imgur.com/62vxI.png
2. == chart https://i.stack.imgur.com/35MpY.png https://i.stack.imgur.com/35MpY.png
- sciencewolf 8y agoThanks! Those are great points. The hint mechanisms could definitely be worked on. I'll be building a component that lets you click to choose order. And yeah, the part about the equality operator is something I hadn't considered, but you're absolutely right that you don't want that to be the focus of your interview.