DEV Community

Discussion on: JavaScript’s Filter Function Explained By Applying To College

Collapse
 
kamalhm profile image
Kamal • Edited

this is nice! Thanks!

edit

you should fix the typo in the student attributes, because it's case sensitive

Collapse
 
kbk0125 profile image
Kevin Kononenko

Thanks Kamal! which one are you talking about?

Collapse
 
iksworks profile image
Ishmael Sunday • Edited

Some of the names start with caps and other don’t. They all should start lower or uppercase for consistency.

Also in your explanation, you said they need 3.2 or up. The function is not considering 3.2. You used (>) which excludes 3.2. Should it be >= ? You might want to as “s” word student in the return. students.gpa etc.

I am just a beginner. Starting my first JS class on the 18th. Thanks for the article too.

Thread Thread
 
kbk0125 profile image
Kevin Kononenko

Hey Ishmael, yep, you are correct about the 3.2 thing. As for "students" v. "Students", I tried to use the uppercase when referring to actual students, and lowercase when referring to the students array.

My original article uses interactive images that make this a little more clear:

blog.codeanalogies.com/2018/05/14/...

Collapse
 
kamalhm profile image
Kamal

Instead of student.sat you should change it to student.SAT

Thread Thread
 
kbk0125 profile image
Kevin Kononenko

Good point. Fixed the SAT issues.