tl;dr: No! Arrow functions and function declarations / expressions are not equivalent and cannot be replaced blindly.
If the function you want to replace does not use this, arguments and is not called with new, then yes.


As so often: it depends. Arrow functions have different behavior than function declarations / expressions, so let's have a look at the differences first:

1. Lexical this and arguments

Arrow functions don't have their own this or arguments binding. Instead, those identifiers are resolved in the lexical scope like any other variable. That means that inside an arrow function, this and arguments refer to the values of this and arguments in the environment the arrow function is defined in (i.e. "outside" the arrow function):

// Example using a function expression
function createObject() {
  console.log('Inside `createObject`:', this.foo);
  return {
    foo: 42,
    bar: function() {
      console.log('Inside `bar`:', this.foo);
    },
  };
}

createObject.call({foo: 21}).bar(); // override `this` inside createObject

// Example using a arrow function
function createObject() {
  console.log('Inside `createObject`:', this.foo);
  return {
    foo: 42,
    bar: () => console.log('Inside `bar`:', this.foo),
  };
}

createObject.call({foo: 21}).bar(); // override `this` inside createObject

In the function expression case, this refers to the object that was created inside the createObject. In the arrow function case, this refers to this of createObject itself.

This makes arrow functions useful if you need to access the this of the current environment:

// currently common pattern
var that = this;
getData(function(data) {
  that.data = data;
});

// better alternative with arrow functions
getData(data => {
  this.data = data;
});

Note that this also means that is not possible to set an arrow function's this with .bind or .call.

If you are not very familiar with this, consider reading

  • MDN - this
  • YDKJS - this & Object prototypes

2. Arrow functions cannot be called with new

ES2015 distinguishes between functions that are callable and functions that are constructable. If a function is constructable, it can be called with new, i.e. new User(). If a function is callable, it can be called without new (i.e. normal function call).

Functions created through function declarations / expressions are both constructable and callable.
Arrow functions (and methods) are only callable. class constructors are only constructable.

If you are trying to call a non-callable function or to construct a non-constructable function, you will get a runtime error.


Knowing this, we can state the following.

Replaceable:

  • Functions that don't use this or arguments.
  • Functions that are used with .bind(this)

Not replaceable:

  • Constructor functions
  • Function / methods added to a prototype (because they usually use this)
  • Variadic functions (if they use arguments (see below))
  • Generator functions, which require the function* notation

Lets have a closer look at this using your examples:

Constructor function

This won't work because arrow functions cannot be called with new. Keep using a function declaration / expression or use class.

Prototype methods

Most likely not, because prototype methods usually use this to access the instance. If they don't use this, then you can replace it. However, if you primarily care for concise syntax, use class with its concise method syntax:

class User {
  constructor(name) {
    this.name = name;
  }
  
  getName() {
    return this.name;
  }
}

Object methods

Similarly for methods in an object literal. If the method wants to reference the object itself via this, keep using function expressions, or use the new method syntax:

const obj = {
  getName() {
    // ...
  },
};

Callbacks

It depends. You should definitely replace it if you are aliasing the outer this or are using .bind(this):

// old
setTimeout(function() {
  // ...
}.bind(this), 500);

// new
setTimeout(() => {
  // ...
}, 500);

But: If the code which calls the callback explicitly sets this to a specific value, as is often the case with event handlers, especially with jQuery, and the callback uses this (or arguments), you cannot use an arrow function!

Variadic functions

Since arrow functions don't have their own arguments, you cannot simply replace them with an arrow function. However, ES2015 introduces an alternative to using arguments: the rest parameter.

// old
function sum() {
  let args = [].slice.call(arguments);
  // ...
}

// new
const sum = (...args) => {
  // ...
};

Related question:

  • When should I use arrow functions in ECMAScript 6?
  • Do ES6 arrow functions have their own arguments or not?
  • What are the differences (if any) between ES6 arrow functions and functions bound with Function.prototype.bind?
  • How to use arrow functions (public class fields) as class methods?

Further resources:

  • MDN - Arrow functions
  • YDKJS - Arrow functions
Answer from Felix Kling on Stack Overflow
🌐
freeCodeCamp
freecodecamp.org › news › the-difference-between-arrow-functions-and-normal-functions
Arrow Functions vs Regular Functions in JavaScript – What's the Difference?
April 13, 2023 - As you can see in the results, by logging this from print2, obj is the result. ... With normal functions, you can create constructors which serve as a special function for instantiating an object from a class.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Functions › Arrow_functions
Arrow function expressions - JavaScript - MDN Web Docs
February 21, 2026 - An arrow function expression is a compact alternative to a traditional function expression, with some semantic differences and deliberate limitations in usage:
Discussions

javascript - Are 'Arrow Functions' and 'Functions' equivalent / interchangeable? - Stack Overflow
What about JavaScript ecma6 change normal function to arrow function? Of course, a normal question can never be as good and generic as one specifically written to be a canonical. ... Look at this Plnkr example The variable this is very different timesCalled increments only by 1 each time the ... More on stackoverflow.com
🌐 stackoverflow.com
Arrow vs normal functions
I get the value of arrow functions as shorthand in lots of contexts, but the course seems to use them almost exclusively with variables, instead of just building separate functions. Why would I make a variable and assign an arrow function when I could just create a new function? More on forum.freecodecamp.org
🌐 forum.freecodecamp.org
1
0
January 15, 2024
javascript - When should I use normal functions or arrow functions? - Stack Overflow
What are the advantages/disadvantages for creating a top level function in ES6 with arrows or without? (2 answers) Closed 2 years ago. For your average vanilla javascript project, how often do you use function with the function keyword or arrow functions? Is it okay to use more one side and ... More on stackoverflow.com
🌐 stackoverflow.com
Arrow functions vs regular functions
Arrow functions are not hoisted, so you have to initialise it before calling but normal functions can be called before initialisation. More on reddit.com
🌐 r/vuejs
28
5
August 15, 2023
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › difference-between-regular-functions-and-arrow-functions
Difference between Regular functions and Arrow functions - GeeksforGeeks
October 15, 2025 - Arrow functions in JavaScript are a concise way to define functions using the => syntax. They do not have their own this context, instead inheriting it from the surrounding scope.
🌐
DEV Community
dev.to › hriztam › arrow-functions-vs-normal-functions-in-javascript-2l70
Arrow Functions vs. Normal Functions in JavaScript - DEV Community
January 31, 2024 - Arrow functions are nice for anonymous functions. ... Yeah right! ... Unfortunately, not everything was clear to me, I’m not a technical specialist! but sometimes I read materials on such topics to be comprehensively developed ... Refreshing! ... I am learning a lot from the comments as well. ... usually I will answer this question this way, normal funtion play the role of implementing classes in JavaScript.
Top answer
1 of 3
1142

tl;dr: No! Arrow functions and function declarations / expressions are not equivalent and cannot be replaced blindly.
If the function you want to replace does not use this, arguments and is not called with new, then yes.


As so often: it depends. Arrow functions have different behavior than function declarations / expressions, so let's have a look at the differences first:

1. Lexical this and arguments

Arrow functions don't have their own this or arguments binding. Instead, those identifiers are resolved in the lexical scope like any other variable. That means that inside an arrow function, this and arguments refer to the values of this and arguments in the environment the arrow function is defined in (i.e. "outside" the arrow function):

// Example using a function expression
function createObject() {
  console.log('Inside `createObject`:', this.foo);
  return {
    foo: 42,
    bar: function() {
      console.log('Inside `bar`:', this.foo);
    },
  };
}

createObject.call({foo: 21}).bar(); // override `this` inside createObject

// Example using a arrow function
function createObject() {
  console.log('Inside `createObject`:', this.foo);
  return {
    foo: 42,
    bar: () => console.log('Inside `bar`:', this.foo),
  };
}

createObject.call({foo: 21}).bar(); // override `this` inside createObject

In the function expression case, this refers to the object that was created inside the createObject. In the arrow function case, this refers to this of createObject itself.

This makes arrow functions useful if you need to access the this of the current environment:

// currently common pattern
var that = this;
getData(function(data) {
  that.data = data;
});

// better alternative with arrow functions
getData(data => {
  this.data = data;
});

Note that this also means that is not possible to set an arrow function's this with .bind or .call.

If you are not very familiar with this, consider reading

  • MDN - this
  • YDKJS - this & Object prototypes

2. Arrow functions cannot be called with new

ES2015 distinguishes between functions that are callable and functions that are constructable. If a function is constructable, it can be called with new, i.e. new User(). If a function is callable, it can be called without new (i.e. normal function call).

Functions created through function declarations / expressions are both constructable and callable.
Arrow functions (and methods) are only callable. class constructors are only constructable.

If you are trying to call a non-callable function or to construct a non-constructable function, you will get a runtime error.


Knowing this, we can state the following.

Replaceable:

  • Functions that don't use this or arguments.
  • Functions that are used with .bind(this)

Not replaceable:

  • Constructor functions
  • Function / methods added to a prototype (because they usually use this)
  • Variadic functions (if they use arguments (see below))
  • Generator functions, which require the function* notation

Lets have a closer look at this using your examples:

Constructor function

This won't work because arrow functions cannot be called with new. Keep using a function declaration / expression or use class.

Prototype methods

Most likely not, because prototype methods usually use this to access the instance. If they don't use this, then you can replace it. However, if you primarily care for concise syntax, use class with its concise method syntax:

class User {
  constructor(name) {
    this.name = name;
  }
  
  getName() {
    return this.name;
  }
}

Object methods

Similarly for methods in an object literal. If the method wants to reference the object itself via this, keep using function expressions, or use the new method syntax:

const obj = {
  getName() {
    // ...
  },
};

Callbacks

It depends. You should definitely replace it if you are aliasing the outer this or are using .bind(this):

// old
setTimeout(function() {
  // ...
}.bind(this), 500);

// new
setTimeout(() => {
  // ...
}, 500);

But: If the code which calls the callback explicitly sets this to a specific value, as is often the case with event handlers, especially with jQuery, and the callback uses this (or arguments), you cannot use an arrow function!

Variadic functions

Since arrow functions don't have their own arguments, you cannot simply replace them with an arrow function. However, ES2015 introduces an alternative to using arguments: the rest parameter.

// old
function sum() {
  let args = [].slice.call(arguments);
  // ...
}

// new
const sum = (...args) => {
  // ...
};

Related question:

  • When should I use arrow functions in ECMAScript 6?
  • Do ES6 arrow functions have their own arguments or not?
  • What are the differences (if any) between ES6 arrow functions and functions bound with Function.prototype.bind?
  • How to use arrow functions (public class fields) as class methods?

Further resources:

  • MDN - Arrow functions
  • YDKJS - Arrow functions
2 of 3
53

Arrow functions => best ES6 feature so far. They are a tremendously powerful addition to ES6, that I use constantly.

Wait, you can't use arrow function everywhere in your code, its not going to work in all cases like this where arrow functions are not usable. Without a doubt, the arrow function is a great addition it brings code simplicity.

But you can’t use an arrow function when a dynamic context is required: defining methods, create objects with constructors, get the target from this when handling events.

Arrow functions should NOT be used because:

  1. They do not have this

    It uses “lexical scoping” to figure out what the value of “this” should be. In simple word lexical scoping it uses “this” from the inside the function’s body.

  2. They do not have arguments

    Arrow functions don’t have an arguments object. But the same functionality can be achieved using rest parameters.

let sum = (...args) => args.reduce((x, y) => x + y, 0);
sum(3, 3, 1) // output: 7
  1. They cannot be used with new

    Arrow functions can't be constructors because they do not have a prototype property.

When to use arrow function and when not:

  1. Don't use to add function as a property in object literal because we can not access this.
  2. Function expressions are best for object methods. Arrow functions are best for callbacks or methods like map, reduce, or forEach.
  3. Use function declarations for functions you’d call by name (because they’re hoisted).
  4. Use arrow functions for callbacks (because they tend to be terser).
🌐
Medium
medium.com › @suchitkore1528 › 8-major-differences-between-arrow-function-and-normal-function-in-javascript-13b490020b60
8 Major differences between Arrow function and Normal function in JavaScript | by Suchitkore | Medium
October 1, 2023 - The arrow function was introduced in ES6. And it introduced a simple and shorter way to create functions. Here’s how to create a normal function, with arguments, which returns something:
🌐
JavaScript in Plain English
javascript.plainenglish.io › arrow-functions-vs-regular-functions-which-one-wins-e87164a5b28e
Arrow Functions vs. Regular Functions — Which One Wins? | by Infodigit | JavaScript in Plain English
July 30, 2025 - If you’re a JavaScript developer — new or experienced — you’ve probably heard that arrow functions are shorthand for regular functions. But that’s only partly true. Behind the cleaner syntax lies a world of differences that can make or break your code’s behavior, especially in object-oriented patterns, callback functions, and asynchronous logic.
Find elsewhere
🌐
freeCodeCamp
freecodecamp.org › news › regular-vs-arrow-functions-javascript
JavaScript Arrow Functions vs Regular Functions
April 2, 2025 - Whether you use a regular function or arrow function depends on the specific use case. It's recommended to use regular function in any of the following cases: when you need to use a constructor with the new keyword · when you need the this binding to be dynamically scoped ... As you've learned from this article, both are valid ways of defining functions in JavaScript.
🌐
freeCodeCamp
forum.freecodecamp.org › javascript
Arrow vs normal functions - JavaScript - The freeCodeCamp Forum
January 15, 2024 - I get the value of arrow functions as shorthand in lots of contexts, but the course seems to use them almost exclusively with variables, instead of just building separate functions. Why would I make a variable and assign…
🌐
Stack Overflow
stackoverflow.com › questions › 76782943 › when-should-i-use-normal-functions-or-arrow-functions
javascript - When should I use normal functions or arrow functions? - Stack Overflow
If it's a simple one-line evaluation, an arrow function is usually easiest. If you need to preserve this, use an arrow function. If it's an event listener where this should be the target, use a regular function.
🌐
Reddit
reddit.com › r/vuejs › arrow functions vs regular functions
r/vuejs on Reddit: Arrow functions vs regular functions
August 15, 2023 -

What does everyone prefer? Arrow functions or regular functions?

Regular function

function doSomething(argument) {
    console.log(argument)
}

Arrow function

const doSomething = (argument) => {
   console.log(argument)
}

I am aware of the differences (regular functions have a local this whereas arrow function use a global this ) which plays no role for me. So it is just a different syntax, it seems to me. Which do you prefer? Why? What are the pro's and con's of each?

🌐
Medium
medium.com › design-bootcamp › arrow-functions-vs-regular-functions-in-javascript-29db7928d696
Arrow functions Vs Regular functions in Javascript | by specky dude | Bootcamp | Medium
August 23, 2023 - Arrow functions are often preferred in modern JavaScript code for their readability and shorter syntax, but regular functions are still essential for certain scenarios.
🌐
Medium
dev-aditya.medium.com › understanding-this-in-javascript-arrow-functions-vs-regular-functions-704a8452c4f1
Understanding this in JavaScript: Arrow Functions vs. Regular Functions | by Aditya Yadav | Medium
April 27, 2025 - Use arrow functions where simplicity and lexical scoping shine, and opt for regular functions when you need dynamic this behavior or prototype-based inheritance. By understanding these distinctions, you’ll unlock a deeper level of JavaScript ...
🌐
Dmitri Pavlutin
dmitripavlutin.com › differences-between-arrow-and-regular-functions
5 Differences Between Arrow and Regular Functions
March 21, 2023 - If you try to invoke an arrow function prefixed with new keyword, JavaScript throws an error meaning that an arrow function cannot be a constructor.
🌐
Better Programming
betterprogramming.pub › difference-between-regular-functions-and-arrow-functions-f65639aba256
The Difference Between Regular Functions and Arrow Functions | by Ashutosh Verma | Better Programming
July 29, 2019 - Unlike regular functions, arrow functions do not have their own this. The value of this inside an arrow function remains the same throughout the lifecycle of the function and is always bound to the value of this in the closest non-arrow parent ...
🌐
Medium
medium.com › @diwyanshu.prasad › differences-between-arrow-functions-and-regular-functions-in-javascript-4a7bb4b2bc4b
Differences between Arrow Functions and Regular Functions in JavaScript: | by Diwyanshu Prasad | Medium
June 16, 2023 - Arrow Functions: Arrow functions cannot be used as constructors. They lack the prototype property and cannot be instantiated with the new keyword. ... Normal Functions: Normal functions can be used as constructors by invoking them with the new ...
🌐
Medium
makstyle119.medium.com › arrow-function-vs-normal-function-in-javascript-6ef3b2b91f88
Arrow Function vs Normal Function in JavaScript | by MAK STYLE 119 | Medium
March 29, 2023 - Arrow functions are more concise and useful for simple, one-line functions, while normal functions are better suited for more complex logic or when you need access to the this keyword.
🌐
The Valley of Code
thevalleyofcode.com › javascript-functions-vs-arrow-functions
Arrow functions vs regular functions in JavaScript
const car = { brand: 'Ford', model: 'Fiesta', start: function() { console.log(`Started ${this.brand} ${this.model}`) }, stop: () => { console.log(`Stopped ${this.brand} ${this.model}`) } } this in the start() method refers to the object itself. But in the stop() method, which is an arrow function, it doesn’t.