I have created a new Array by Object constructor, why its nature is still array
myArr = [1,2,3];
var newArr = Object(myArr);
if (newArr instanceof Array) {
console.log('This to is an array');
}
console.log(newArr);
I have created a new Array by Object constructor, why its nature is still array
myArr = [1,2,3];
var newArr = Object(myArr);
if (newArr instanceof Array) {
console.log('This to is an array');
}
console.log(newArr);