I was wondering if someone could help me understand this. I searched and I could not figure it out. I tried a few other things
var myConcat = () => concat(arr1).arr2;
{
“use strict”;
};
// test your code
console.log(myConcat([1, 2], [3, 4, 5]));
among others. Could someone please assist me in understanding this?
Your code so far
var myConcat = (arr1 => arr2);
{
"use strict";
return arr1.concat(arr2);
};
// test your code
console.log(myConcat([1, 2], [3, 4, 5]));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.
I used this, it seems to be a much simpler solution than what is given under “Get a Hint.” It also demonstrates a concept from the previous lesson ES6: Use Arrow Functions to Write Concise Anonymous Functions. With arrow function syntax, you don’t need to have a function body.
I want to make a contribution and change the hint section somehow…but I am not sure how to do that yet :-D. That’s a question for another thread though.
const myConcat = (arr1, arr2) => (arr2);
// test your code
console.log(myConcat([1, 2], [3, 4, 5]));
Hello Aaldea! I’m wondering if you ever did start over with the Javascript and if it helped? Because I’m having such a hard time as I did with the first section of Javascript and am debating on doing the same as I’m just not grasping it.