Examveda
Examveda

If you have a function f and an object o, you can define a method named m of o with

A. o.m=m.f;

B. o.m=f;

C. o=f.m;

D. o=f;

Answer: Option A

Solution(By Examveda Team)

A method is nothing more than a JavaScript function that is stored in a property of an object. If you have a function f and an object o, you can define a method named m of o with the following line:
o.m = f;

This Question Belongs to Javascript >> Array And Function

Join The Discussion

Comments ( 1 )

  1. Sandeep Soumya
    Sandeep Soumya :
    3 years ago

    please give the correct option as B

Related Questions on Array and Function