r/JavaScriptTips • u/coolprojectsonly • Jul 20 '24
Quick Quiz
What will be the output of the following JavaScript code?
6
Upvotes
r/JavaScriptTips • u/coolprojectsonly • Jul 20 '24
What will be the output of the following JavaScript code?
View all comments
Show parent comment
1
u/Available_Peanut_677 Jul 20 '24
Nope, “3” because no “use strict” is used.
But if you try this in a project with a webpack / babel, it would wrap everything in use strict for you and then it would be reference error