Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript remove function from object

var obj = {
  func: function(a, b) {
    return a + b;
  }
};
delete obj.func;
obj.func(); // Uncaught TypeError: obj.func is not a function
 
PREVIOUS NEXT
Tagged: #javascript #remove #function #object
ADD COMMENT
Topic
Name
1+5 =