Which of the following shows an example of passing an argument to a function?
A alert("Hello world!") B document.write("<h1>Welcome</h1>") C Math.floor(2.2) D getArea(10, 20, 'sq ft') E All of the above. i think answer should be (D) but the correct answer is all the above how is it correct?? because u can pass arguments only inside function call .
Martin JonesFront End Web Development Techdegree Graduate 41,145 Points
I guess one way to look at it is:
myFunctions("Arguments this functions accepts");
So once the function is created, you can then call the function and pass in the arguments.
The answer D is the same as all of the other functions in the list, but in this case it accepts 2 values instead of 1.
Otec Perez Glass7,678 Points
Hello even though document.write , alert, console.log and other are functions that we can pass information to it if i or some else have selected the option d (getArea (info)) should not be wrong in your system so try use like a check box that we can select different answers .