JavaScript Periksa apakah variabel adalah objek
let myObject = {
firstname: 'harry',
lastname: 'potter'
}
//check the typeof if, boolean, object, string etc...
console.log(typeof myObject);
if(typeof myObject === 'object') {
console.log('this is object');
}
Excited Elk