About 616,000 results
Open links in new tab
  1. JavaScript Functions - W3Schools

    Since local variables are only recognized inside their functions, variables with the same name can be used in different functions. Local variables are created when a function starts, and deleted …

  2. Functions - JavaScript | MDN

    Jul 8, 2025 · A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some …

  3. Lambda Expressions in JavaScript - GeeksforGeeks

    Jul 23, 2025 · A lambda expression also known as arrow-function is a function without a name defined using the arrow => syntax introduced in ES6 (ECMAScript 2015). Unlike traditional …

  4. Javascript Functions - Javascript Cheatsheet

    When you call the function, you provide values for a and b: 1 and 2 are the arguments that are passed into the function. The function adds these values together and returns the result. You …

  5. How to Write JavaScript Functions | JavaScript.com

    JavaScript functions are reusable blocks of code that perform a specific task, taking some form of input and returning an output. To define a function, you must use the function keyword, …

  6. JavaScript Function and Function Expressions (with Examples)

    We can create a function in JavaScript using the function keyword: console.log("Hello World!"); Here, we have created a simple function named greet() that prints Hello World! on the screen. …

  7. Learn JavaScript: Functions Cheatsheet | Codecademy

    The syntax for an arrow function expression does not require the function keyword and uses a fat arrow => to separate the parameter (s) from the body. There are several variations of arrow …

  8. Functions in JavaScript - GeeksforGeeks

    Sep 13, 2025 · Functions in JavaScript are reusable blocks of code designed to perform specific tasks. They allow you to organize, reuse, and modularize code. It can take inputs, perform …

  9. JavaScript function Statement - W3Schools

    A declared function is "saved for later use", and will be executed later, when it is invoked (called). In JavaScript, functions are objects, and they have both properties and methods.

  10. JavaScript Functions: From Basics to Advanced

    In JavaScript, a function can be defined using the function keyword, followed by the name of a function and parentheses. Optionally, a list of input parameters can be included within the …