Flashcards
Functions
Cards in this deck (7)
- 1What are functions useful for?Organize and reuse blocks of code
- 2How do you invoke a function?By calling its name followed by parentheses () and including an argument (if needed)
- 3What are anonymous functions?Functions that doesn't have a name. Generally, anonymous functions are declared inside blocks of code, such as conditions or as arguments to other functions
- 4What is function scope?It's the block of code defined by a function enclosed in curly braces {}. Variables or functions declared within this scope can only be acessed from inside the function
- 5What are return values?Values that a function produces and sends back when it finishes executing
- 6What are arrow functions?Anonymous functions declared without name. They use the syntax () => to define the function
- 7What is the difference between a function declaration and a function expression?A function declaraction can be called globally. A function expression is created only when the script reaches the block of code where it is defined, so it can't be called before that point.
Information
- Description
- Técnico Javascript Flashcards on Functions, created by Lucas Bastos on 20/10/2024.
- Created by
- Lucas Bastos
- Views
- 0
- Rating