Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Incorrect] answer to array method bind #98

Open
1 of 4 tasks
acagastya opened this issue Oct 19, 2019 · 10 comments
Open
1 of 4 tasks

[Incorrect] answer to array method bind #98

acagastya opened this issue Oct 19, 2019 · 10 comments

Comments

@acagastya
Copy link
Contributor

acagastya commented Oct 19, 2019

Describe the bug
For the question Array Method Binding, an incorrect answer is set to correct answer.

Expected behavior
The expected output is

1
2
3

And since it is not an option, the right answer should be Something else.

Possible update:
Change the question to:

const reduce = ['a', 'b', 'c'].reduce.bind([1, 2, 3]);
reduce((acc, cur) => acc + cur, '');

The options being:

  • 123
  • abc
  • An error is thrown
  • Something else
@acagastya
Copy link
Contributor Author

Updated in #99

@nas5w
Copy link
Owner

nas5w commented Oct 20, 2019

I'm not sure I agree with this. I don't really want to get into technicalities surrounding whether there are line breaks in the console output.

@nas5w nas5w mentioned this issue Oct 20, 2019
@acagastya
Copy link
Contributor Author

The only reason I got my answer wrong is that I was expecting it on new lines, and it was not in the option. If we are going for the subtle things, I think this should be considered.

@hn3000
Copy link

hn3000 commented Jan 21, 2020

An alternative fix could be to rephrase the question:

"Which values are logged in the following scenario?"

@hn3000
Copy link

hn3000 commented Jan 21, 2020

Yet another alternative: remove the "Something else" option.

@acagastya
Copy link
Contributor Author

In both the cases, @hn3000, it feels as the options are wrong. If it wasn't 'something else', I would have thought the options were wrong. Either the options should reflect the correct result, or the code snippet should be changed, imho.

@hn3000
Copy link

hn3000 commented Jan 21, 2020

True. Same happens in the Superman / Batman example. But I can also understand @nas5w when he says "I don't really want to get into technicalities surrounding whether there are line breaks in the console output."

@inomdzhon
Copy link

@hn3000 hmmm, interesting, but here (see image) we have separator by space 🤔 And it isn't falsetrue 😅

And then why not "Batman" "Superman" @nas5w? 😃
"BatmanSuperman" incorrect 😞

PS: anyway, @nas5w thanks a lot for the quiz – it's gambling and refreshes the mind 😌

image

@acagastya
Copy link
Contributor Author

@inomdzhon Yeah, when there is a possibility of string formatting, and there is an option NOTA, that is different from this one. There is a scope of ambiguity in that one. Not in this one.

@inomdzhon
Copy link

One more point...
Each items separated by ,

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants