Difference between Functions and Methods concept(javascript) Functions: Functions are defined with function keyword followed by a name, followed by paranthesis. It is a block of code designed to perform a particular task. It is executed when something invokes(calls) it. Example: function executeTask(){ console.log('Task is executed...'); } executeTask(); Methods: Methods are functions stored as object properties. You can access and object method like objectName.methodName() Example: const task = { start: function(){ console.log('task is started...'); } }; task.start(); - Study24x7
Social learning Network
58 followers study24x7 12 May 2020 10:28 PM study24x7 study24x7

Difference between Functions and Methods concept(javascript) Functions: Functions are defined with function keyword followed by a name, followed by paranthesis. It is a block of code designed to perform a particular task. It is executed when something invokes(calls) it. Example...

See more

study24x7
Write a comment
  • prem shankar
  • Thanks! it is very important and conceptual
    Related Questions
    500+   more Questions to answer
    Most Related Articles