Welcome file JavaScript Operators The instanceof Operator The instanceof operator is used to check the type of an object at run time. The instanceof operator returns a boolean value that indicates if an object is an instance of a particular class. we can see below example. var fruits = ["apple", "mango", "pineapple"]; fruits instanceof Array; // returns true fruits instanceof Object; // returns true fruits instanceof String; // returns false fruits instanceof Number; // returns false in operator The in operator is used to check whether a given property is available on an object. property in object var fruits = ["apple", "mango", "pineapple"]; apple in fruit //returns true 0 in fruit // returns true 5 in fruit //returns false length in fruit // return true The delete Operator The delete operator deletes a property from an ob
Amritanjali's blog UI Source on UI related technologies like Angular, TypeScript, JavaScript, HTML, CSS.