Issue with JS Challenge Question by K Akbas | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Issue with JS Challenge Question by K Akbas

Anyone see a flaw in my explanation here? - See link below to run this code: https://code.sololearn.com/WnRpPSE068t9/#html ----------------------------------------- * JavaScript Question by K Akbas: * ----------------------------------------- What is the output of this code? var a = {}, b = {}; console.log(a === b || 0); a = b = {}; console.log(a === b); ----------------------------------------- * Answer provided by K Akbas: * ----------------------------------------- 01 ----------------------------------------- * Issues with the author's answer: * ----------------------------------------- 1. The console.log() method will split the answer to separate lines in the console rather than combine the output to a single line as suggested by the author. - The author should have used the document.write() method to produce an answer with output on the same line. 2. The 2nd output from console.log(a === b) will result in "true" instead of "1". - The author may have been thinking of how booleans are handled in PHP. ----------------------------------------- * Correct answer should have been: * ----------------------------------------- 0 true -----------------------------------------

27th Aug 2017, 3:55 AM
David Carroll
David Carroll - avatar
5 Answers
+ 15
@David C As far as I'm concerned, those reports are surely being reviewed and checked. But it depends upon how many reports it gets, if there are minimum of 3 reports then the admins are up to take an action against it. P.S. I've reported this quiz too, and I'm going to contact the admins about the issue, don't worry.
27th Aug 2017, 5:47 AM
Dev
Dev - avatar
+ 14
If you ever find wrong quizzes in existing challenges, you can review and report them after both sides have completed the challenge. There is an option to do so within 'View Correct Answers'. Your feedback is highly appreciated.
27th Aug 2017, 4:25 AM
Dev
Dev - avatar
+ 8
you are absolutely correct and I somehow ignored that so far. Will report it once I encounter it again 😃
27th Aug 2017, 8:51 AM
Nikolay Nachev
Nikolay Nachev - avatar
+ 5
Hi @Dev... Thanks for the reply. I am familiar with the report feature and have reported several issues in the past. However, without a feedback loop, it's never clear if these reported issues are actively being received and reviewed. I end up seeing the invalid questions repeated over a long period of time and will report those questions each time. After a while I notice a trend where most people will start out getting the invalid questions wrong and eventually, everyone consistently knows to select the incorrect option. Since this particular issue was so blatantly obvious and was brand new for me, I decided to also post details to assist reviewers with a more thorough review - complete with explanation and test code.
27th Aug 2017, 4:43 AM
David Carroll
David Carroll - avatar
+ 5
@David - it is fixed now 😃
20th Sep 2017, 4:33 PM
Nikolay Nachev
Nikolay Nachev - avatar