...
/Challenge: Check Instance of Variables
Challenge: Check Instance of Variables
This is a tricky challenge that will test your understanding of the "instanceof" operator, functions, the "new" operator, and objects in JavaScript.
We'll cover the following...
Problem statement #
There are two functions in the code below: tempFunc1
and check
.
Press + to interact
var tempFunc1 = function () {}function check(){var object1 = new tempFunc1();var object2 = tempFunc1();return (object1 instanceof tempFunc1 === object2 instanceof tempFunc1);}console.log(check())
The check
function defines two variables: ...