FOAP-NetMind-2022 / beetlepush

Learn JavaScript array methods
https://beetlepush.vercel.app/
Mozilla Public License 2.0
4 stars 0 forks source link

level 18 added #68

Closed omiras closed 2 years ago

omiras commented 2 years ago

I added a new level.

Some questions:

  1. How do you feel about wording an exercise that already has worked with the same array method? I did it this way:

image

  1. I figured out I had to use very close values to create the exercise. Otherwise, the user could use a wide range of numbers to achieve the exercise
    
    var myGrass = [{name:'worm', weight: 21}, {name:'ladybug', weight: 20},
               {name:'spider', weight: 22}];

var hugeBugs = myGrass.filter(x => x.weight > 20);



3. @SaraaLee some lore added šŸ˜Š
![image](https://user-images.githubusercontent.com/3286458/198889873-464ad77d-baf7-4334-a825-bf843f32b5a3.png)
Andreu-G commented 2 years ago

For the naming convention, I have another suggestion: filter(); //2 That way the " -2 " isn't part of the method, and with // we're indicating it's a comment. I'd like to hear everyone else's opinion, however I think the semicolon should definitely "close" the method, as the number just indicates that it's another exercise, it is not part of the "code".

SaraaLee commented 2 years ago

This afternoon I'm going to see new level and lore. Iā€™m so sorry that Iā€™m late and missing.

omiras commented 2 years ago

For the naming convention, I have another suggestion: filter(); //2 That way the " -2 " isn't part of the method, and with // we're indicating it's a comment. I'd like to hear everyone else's opinion, however I think the semicolon should definitely "close" the method, as the number just indicates that it's another exercise, it is not part of the "code".

Thanks!! Suggestion committed.