This course has been updated! We now recommend you take the JavaScript: From First Steps to Professional course.

Check out a free preview of the full JavaScript: From Fundamentals to Functional JS, v2 course:
The "Translate into ES6 Solution" Lesson is part of the full, JavaScript: From Fundamentals to Functional JS, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Bianca walks through the solution to Translate into ES6 Exercise.

Get Unlimited Access Now

Transcript from the "Translate into ES6 Solution" Lesson

[00:00:00]
>> Bianca Gandolfo: All right, so what do we do here?
>> Bianca Gandolfo: Increment = (n).
>> Bianca Gandolfo: Actually we could do this
>> Bianca Gandolfo: n + 1.
>> Bianca Gandolfo: All right,
>> Bianca Gandolfo: n, so, in this case, because we're saying n times n and n + n, we don't need It to explicitly return or have brackets.

[00:00:44] However, I recommend for your sanity, cuz there's a lot of edge cases, just to always do it. Just make your life better.
>> Bianca Gandolfo: And so we have doMathSoIDontHaveTo.
>> Bianca Gandolfo: And that equals that, and we need to have n, func. Yeah, also we don't need these.
>> Bianca Gandolfo: And then we return func(n).

[00:01:32]
>> Bianca Gandolfo: All right.
>> Speaker 2: [INAUDIBLE]
>> Bianca Gandolfo: Thank you. Okay.
>> Bianca Gandolfo: There we go.
>> Bianca Gandolfo: Any questions?
>> Bianca Gandolfo: That's a nice break from scope. A scope brain, mush.