What is the output of the following code: console.log([1, 2, 3] instanceof Array);?
a)
trueb)
falsec)
undefinedd)
nullAnswer:
a)
trueExplanation:
The instanceof operator checks if an object is an instance of a specific class. In this case, [1, 2, 3] is an array, so the result of [1, 2, 3] instanceof Array is true.