decode now
  • Home
  • Blog
    • AI
    • Backend
      • Java
    • Career & Interviews
    • Frontend
      • HTML
      • CSS
      • JavaScript
    • Full Stack
  • Notes
  • About us
  • Contact US
No Result
View All Result
AI News
  • Home
  • Blog
    • AI
    • Backend
      • Java
    • Career & Interviews
    • Frontend
      • HTML
      • CSS
      • JavaScript
    • Full Stack
  • Notes
  • About us
  • Contact US
No Result
View All Result
Decode Now
No Result
View All Result
JavaScript arrow functions & regular functions

JavaScript Arrow Functions & Regular Functions

admin by admin
June 7, 2026
in JavaScript
0
585
SHARES
3.2k
VIEWS
Summarize with ChatGPTShare to Facebook

Last Updated on June 7, 2026 by admin

JavaScript Arrow Functions & Regular Functions

 

In JavaScript, there are two types of functions i.e., regular functions and arrow functions. Let’s discuss….

 

JavaScript Arrow Functions :-

  • Introduced in ES6 and provide a easy and shorter way to create functions.
  • Allow for a more concise syntax, especially when the function has only one statement that returns a value.
  • Here’s the basic syntax of an arrow function:
    const functionName = (parameters) => {
    // function body
    };
  • Here’s an example of an arrow function to multiply two numbers:
    const multiply = (num1, num2) => num1 * num2;
  • Commonly used in modern JavaScript code for their simplicity and lexical scoping behavior.
  • Implicit return- If the function body consists of a single expression, the result of that expression will be implicitly returned.
  • These functions implicitly return the result of the expression if there are no curly braces around the function body.
  • Arrow Functions don’t have their own this binding. This makes arrow functions more predictable when dealing with this keyword.

JavaScript Regular Functions :-

  • Regular functions have their own this context.  And this is determined dynamically depending on how you call or execute the function.
  • Regular functions can be defined using the function keyword in two main ways: function declaration and function expression.
  • Function declaration example:
        function greet(who) {
    return `Hello, ${who}!`;
    }
  • Function expression example:
        const greet = function(who) {
    return `Hello, ${who}`;
    }
  • Regular functions can return anything and always run to completion after invocation.

 

     Note :-

  • If you want to learn Javascript Arrow & Regular Functions, Above are the key points which will help you to learn more about it.
  • Also, if you like this post or have any queries, Do let me know in the comments.
  •  Below are the resources to learn more about Javascript.

    Resources :-

    • Geeks for Geeks
    • W3School
    • Javascript.info
    • Programiz  
    • mdnwebdocs

 

SummarizeShare234
admin

admin

Related Stories

Mastering JavaScript Error Handling

Mastering JavaScript Error Handling

by admin
June 7, 2026
1

Mastering JavaScript Error Handling   Introduction: JavaScript, as a versatile and powerful programming language, has become the backbone of modern web development. However, like any programming language, it's...

JavaScript Closure

JavaScript Closure

by admin
June 16, 2026
0

Understanding JavaScript Closure JavaScript closures are a fundamental concept that plays a crucial role in the language's functionality. They enable developers to create powerful and flexible code structures...

Understanding JavaScript Hoisting

by admin
June 14, 2026
0

Understanding JavaScript Hoisting JavaScript hoisting is a crucial concept that affects how variables and functions are processed during the compilation phase before code execution. It refers to the...

Introducing JavaScript Object Methods

Introducing JavaScript Object Methods

by admin
June 16, 2026
0

JavaScript Object Methods In JavaScript, objects play a crucial role in representing real-world entities or concepts. They encapsulate data, known as properties or attributes, and the methods (actions...

Next Post
JavaScript Document Object Model

JavaScript Document Object Model

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Decode Now

Learn. Build. Grow. Explore programming tutorials, development roadmaps, interview preparation guides, and career resources designed for aspiring developers.

Follow us

Recent Posts

JavaScript Document Object Model

JavaScript Document Object Model

June 7, 2026
JavaScript arrow functions & regular functions

JavaScript Arrow Functions & Regular Functions

June 7, 2026

Weekly Newsletter

  • Decode Now
  • Blogs
  • Contact US
  • About us

© 2026

No Result
View All Result
  • Home
  • Blog
    • AI
    • Backend
      • Java
    • Career & Interviews
    • Frontend
      • HTML
      • CSS
      • JavaScript
    • Full Stack
  • Notes
  • About us
  • Contact US

© 2026