Answers for "javascript interface class"

0

javascript interface class

Object.prototype.can = function(methodName)
{
     return ((typeof this[methodName]) == "function");
};

if (someObject.can("quack"))
{
    someObject.quack();
}
Posted by: Guest on July-29-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language