About 866,000 results
Open links in new tab
  1. Functions - JavaScript | MDN - MDN Web Docs

    Mar 22, 2025 · Functions form a scope for variables—this means variables defined inside a function cannot be accessed from anywhere outside the function. The function scope inherits from all the upper scopes. For example, a function defined in the global scope can access all variables defined in the global scope.

  2. JavaScript Functions - W3Schools

    A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses (). Function names can contain letters, digits, underscores, and dollar signs (same rules as variables).

  3. Functions in JavaScript - GeeksforGeeks

    Apr 15, 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 return outputs. A function definition is sometimes also termed a function declaration or function statement.

  4. List of JavaScript functions - StackHowTo

    May 9, 2021 · I n this tutorial, we are going to see the list of the native functions most used in Javascript. splice (): Is used to modify the contents of an array by removing existing elements and / or adding new elements. indexOf (): Returns the first index at which the given element can be found in an array, or -1 if it is not present in an array.

  5. Functions - The Modern JavaScript Tutorial

    Oct 14, 2022 · A function is an action, so function names are usually verbal. There exist many well-known function prefixes like create… , show… , get… , check… and so on. Use them to hint what a function does.

  6. JavaScript Functions - JavaScript Tutorial

    JavaScript provides many built-in functions such as parseInt() and parseFloat(). In this tutorial, you will learn how to develop custom functions. To declare a function, you use the function keyword, followed by the function name, a list of parameters, and the function body as follows: // function body // ...

  7. JavaScript built-in functions: A cheat sheet for Beginners

    Jul 19, 2023 · A built-in function in JavaScript is a function that’s already available for use without needing any extra code. These functions are a part of JavaScript itself and are designed to do common tasks like working with text, doing math calculations, and handling lists of data.

  8. 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 syntax: Declared functions are not executed immediately.

  9. JavaScript Functions: From Basics to Advanced

    Learn what are functions in JavaScript. Explore the basics of functions in JavaScript, including anonymous and arrow functions, and learn how to organize your code using functions.

  10. JavaScript | Functions - Codecademy

    May 5, 2021 · Functions are one of the fundamental building blocks in JavaScript. A function is a reusable set of statements to perform a task or calculate a value. Functions can be passed one or more values and can return a value at the end of their execution. In order to use a function, it must be defined somewhere in the scope in which it will be utilized.

  11. Some results have been removed