About 141,000 results
Open links in new tab
  1. Function() constructor - JavaScript | MDN - MDN Web Docs

    Mar 13, 2025 · The Function() constructor creates Function objects. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as eval().

  2. JavaScript Object Constructors - W3Schools

    To create an object type we use an object constructor function. It is considered good practice to name constructor functions with an upper-case first letter. In the constructor function, this has no value. The value of this will become the new object when a …

  3. What is a Constructor in JavaScript? - GeeksforGeeks

    Sep 24, 2024 · The JavaScript Function() constructor is used to create new function objects dynamically. By using the Function() constructor with the new operator, developers can define functions on the fly, passing the function body as a string.

  4. JavaScript Constructor Function

    Summary: in this tutorial, you’ll learn about the JavaScript constructor function and how to use the new keyword to create an object. Introduction to JavaScript constructor functions. In the JavaScript objects tutorial, you learned how to use the object literal syntax to create a new object.

  5. JavaScript Constructor Method - GeeksforGeeks

    Feb 15, 2025 · How constructor works in JavaScript? A constructor is a special function used to create and initialize objects, defined using the function keyword or class syntax. The new keyword triggers the constructor, creating a new object and setting this to refer to it.

  6. Constructor, operator "new" - The Modern JavaScript Tutorial

    Oct 1, 2022 · We can use constructor functions to make multiple similar objects. JavaScript provides constructor functions for many built-in language objects: like Date for dates, Set for sets and others that we plan to study.

  7. Constructor Functions in JavaScript 101 | by Sıla Özeren - Medium

    Oct 29, 2024 · What is a Constructor Function? A constructor function is a special type of function in JavaScript that’s used to create and initialize new objects. Unlike regular functions, which...

  8. JavaScript | Constructors - Codecademy

    Jul 24, 2021 · Arguments are passed to the constructor function when you use the new keyword. There are two types of constructors, one defined as a function, and one defined with the constructor method in a class. To use a constructor function to create objects, simply define a JavaScript function with any number of arguments.

  9. Constructor Function in JavaScript: Syntax, Types, & Examples

    Feb 18, 2025 · JavaScript provides various built-in constructors, including Date (), Array (), and Object (). They are custom constructors defined by a programmer to be used throughout the applications. You can use them to define your own object types with …

  10. JavaScript Function() Constructor - GeeksforGeeks

    Jun 9, 2024 · The JavaScript Function() constructor is used to create new function objects dynamically. By using the Function() constructor with the new operator, developers can define functions on the fly, passing the function body as a string.

  11. Some results have been removed
Refresh