+ 2
A method is basically a function that is tied to an object. //function function myAddition(n1, n2){ return n1 + n2; } //this is a method of document, which takes the argument you pass to it and //assigns that object to the variable "foo" var foo = document.getElementByID("test")
22nd Mar 2017, 5:39 PM
Garan Weber
Garan Weber - avatar