NEW
Font size
WorksheetsJavaScript 'this' Keyword Quiz
Total questions: 20
Worksheet time: 10mins
What is the output? (Executed in browser, non-strict mode)
console.log(this);
undefined
{}
window object
null
What is the output?
undefined
Global object
Error
The function itself
What will be logged?
A
undefined
error
this
Output?
undefined
John
Error
this.name
Output?
undefined
Error
Ana
Nothing
Output?
5
undefined
Error
null
What is the output?
50
100
undefined
Error
Output?
window
global object
undefined
Error
Output?
Leo
undefined
Error
null
Output?
Zara
undefined
Error
this.name
Output?
undefined
NaN
40
20
What is logged?
20 then 10
10 then 20
undefined then undefined
Error
Output?
1
undefined
Error
null
Output?
undefined
Error
5
NaN
What is the output?
10
20
undefined
Error
Output?
10
20
undefined
Error
Output?
A
undefined
Error
Nothing
Output?
A
undefined
Error
null
What does this output?
Sam Sam Sam
undefined undefined undefined
Error
Sam undefined Sam
Output?
Global
Local
Inner
undefined
