instanceof vs typeof in JavaScript: How They Actually Work | DevPrep