Guest User

Untitled

a guest
Jul 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. let students = [
  2. {
  3. name: "david",
  4. GPA: 3.3
  5. },
  6. {
  7. name: "sheila",
  8. GPA: 3.1
  9. },
  10. {
  11. name: "Alonzo",
  12. GPA: 3.65
  13. },
  14. {
  15. name: "Mary",
  16. GPA: 3.8
  17. }
  18. ]
  19.  
  20. let admitted = students.filter(function(student){
  21. return student.gpa > 3.2;
  22. })
  23.  
  24. /*admitted = [
  25. {
  26. name: "david",
  27. GPA: 3.3
  28. },
  29. {
  30. name: "Alonzo",
  31. GPA: 3.65
  32. },
  33. {
  34. name: "Mary",
  35. GPA: 3.8
  36. }
  37. ];*/
Add Comment
Please, Sign In to add comment