This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// given the following data object, write functions that returns: | |
// 1- All professors | |
// 2- All students | |
// 3- Name of students with gpa higher than 3.1 | |
// 4- A function that takes the prof. id and return all of his courses by name | |
var data = { | |
"users": [{ | |
"id": "001", | |
"name": "Prof. Alaa Ahmed", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Write a sum method which will work properly when invoked using either syntax below. | |
console.log(sum(2,3)); // Outputs 5 | |
console.log(sum(2)(3)); // Outputs 5 |
NewerOlder