Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Node.JS Discussion on Functions

XARZU

New Coder
I thought I would start a helpful discussion of javascript Functions. Knowing Functions well I think would be helpful for understanding javascript.

Specifically, Functions are Objets in javascript. This is a departure from typical coding where functions are methods of a class.

Mozilla says "In JavaScript, functions are first-class objects, because they can be passed to other functions, returned from functions, and assigned to variables and properties. They can also have properties and methods just like any other object."

Visual code says:
// Functions are also known as anonymous functions. Anonymous functions are functions that have no name.
// Anonymous functions are functions that have no name.

That is interesting but it leads to questionis.
1. If Functions are objects, do they need to be instantiated?
2. In what sort of scenerio would you want to pass a function to another function?

If Functions are anoymous functions. Then what are "functions"?
 
Last edited:

New Threads

Buy us a coffee!

Back
Top Bottom