learn-co-curriculum / fewpjs_arrow_function_shorthand Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
1 const nums = [1,2,3];
2 const squares = nums.map(x => x ** 2); //=> [2,4,6]
3 const doubles = nums.map(x => x * 2); //=> [1,4,9]
So it is displayed in the above way on the learn.co page for the lab - BUT instead of the part to the right of the variable assignment on line two ' //=> [2,4,6]' it needs to be '//=> [1,4,9]'. And vice versa for line 3.
When I run learn command everything works, but when I run submit learn, I get an error Hmm...this doesn't appear to be a Learn lesson. Are you in the right directory?
"we haven't covered iterators quite yet" - yeah you have
on expression is is by analogy.
This lab presents arrow functions as a new concept, but they appear in the four Iterators Drill labs earlier in this section. Also, this lab presents map
(and iterators in general) as a concept that hasn't been covered yet.
#staff
At this point, we have been using function expression and arrow functions in several labs. Especially coming for Ruby, it seems like a good idea to move this right to the beginning of the curriculum and tie into the similarities with Ruby by scaffolding the learning.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.