Question: what is the difference between variable and method?
Answer: A variable is something, which stores data. A function is a bunch of code, which can be executed, if you call. ... See the following syntax: var functionname = function(){} . A method is a function of an object.