Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

783 B

title
title
Write Arrow Functions with Parameters

Write Arrow Functions with Parameters


Problem Explanation

Here is a cool resource about anonymous functions in JavaScript, in case you are still wondering what they are, and their role.

Now, you are tasked at putting parameters inside arrow functions.


Hints

Hint 1

Get rid of the function keyword. Put the arrow operator.

Hint 2

Make sure you changed the var to a const.


Solutions

Solution 1 (Click to Show/Hide)
const myConcat = (arr1, arr2) => {
  "use strict";
  return arr1.concat(arr2);
};
// test your code
console.log(myConcat([1, 2], [3, 4, 5]));