Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Check If Object Contains A Function


 
		 const res = {a:"aaa", b:function(){console.log("b")}};
	 
	 console.log(typeof res.b == "function");
	 /*true, notice it is b and not b()*/

Source by duckduckgo.com #
 
PREVIOUS NEXT
Tagged: #Check #If #Object #Contains #A #Function
ADD COMMENT
Topic
Name
5+3 =