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

    Functions are defined with the function keyword: followed by the function name followed by parentheses ( ) followed by brackets { } The function name follows the naming rules for variables. Optional …

  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 input and …

  3. JavaScript Functions - JavaScript Tutorial

    This tutorial introduces you to JavaScript functions that structure your code into smaller reusable units.

  4. 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 actions, and …

  5. Javascript Functions - Javascript Cheatsheet

    In JavaScript, the return statement ends function execution and specifies a value to be returned to the function caller. add is a function that takes two parameters, a and b, and returns their sum. The …

  6. 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 parentheses. The …

  7. JavaScript Function and Function Expressions (with Examples)

    A function expression is a way to store functions in variables. In this tutorial, you will learn about JavaScript functions and function expressions with the help of examples.

  8. Functions | web.dev

    Mar 31, 2024 · Function declarations consist of the function keyword followed by an identifier, a list of comma-separated parameters enclosed in parentheses, and a block statement called the "function …

  9. JavaScript Function Definitions - W3Schools

    JavaScript functions are defined with the function keyword. You can use a function declaration or a function expression. Earlier in this tutorial, you learned that functions are declared with the following …

  10. function - JavaScript | MDN

    Jul 8, 2025 · The function declaration creates a binding of a new function to a given name. You can also define functions using the function expression.