Method Vs Function
Method Vs Function. Functions and methods both are functions in JavaScript. Functions: A function is a block of statements that takes specific input, does some computations.
Function: a portion of code within a larger program, which performs a specific task and is relatively independent of the remaining code. So what's the different between the two? This is not unique to JavaScript but it's still good to learn and remember. so I've came across this confusing concept between function and method in #javascript so I guess let's open this topic today at #vickysdailystandup-I.
In mathematics, a function is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output.
Method and a function are the same, with different terms.
A method is just a function which is a property of an object. With the exception of the anonymous function all of these terms. To call a method, you need the function's name, a pair of parentheses, and a semicolon.
0 Response to "Method Vs Function"
Posting Komentar