typeofnan-javascript-quizzes icon indicating copy to clipboard operation
typeofnan-javascript-quizzes copied to clipboard

this-keyword: answer ambiguous. Can be undefined

Open senocular opened this issue 6 years ago • 0 comments

Describe the bug

The result of the function in the question can be either window or undefined but the question only accepts window as a correct answer. Here's an example of the same code producing undefined: https://senocular.github.io/tests/function-context/

To Reproduce Steps to reproduce the behavior:

  1. Go to https://quiz.typeofnan.dev/this-keyword/
  2. Click on undefined
  3. Click on submit

Expected behavior Answer is correct or question goes into more detail about the environment beyond just being in the browser that explicitly rules out situations where it may be undefined (i.e. strict mode).

Desktop (please complete the following information):

  • OS: Mac
  • Browser chrome
  • Version 78

senocular avatar Nov 12 '19 12:11 senocular