Answers for "50 javascript interview questions"

0

50 javascript interview questions

var someObject = {
myProperty : 'Foo',

myMethod : function(prefix, postfix) {

    alert(prefix + this.myProperty + postfix);
}
};
someObject.myMethod('<', '>'); // alerts '<Foo>'
var someOtherObject  = {

    myProperty : 'Bar.'

};
someObject.myMethod.call(someOtherObject, '<', '>'); // alerts '<Bar>'

someObject.myMethod.apply(someOtherObject, ['<', '>']); // alerts '<Bar>'
Posted by: Guest on July-22-2021

Code answers related to "50 javascript interview questions"

Code answers related to "Javascript"

Browse Popular Code Answers by Language