Arrays

Consider an example
const myArray = [1,'hi',true,{name:'socks'},[1,2]]
console.log(type of([1,2]))  //object
console.log(myArray.isArray[1,2])//true

What is the difference here in typeof and isArray can anyone pls help.
Was this page helpful?