forked from BushraAlabsi/Toy_Problems
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathData_Modeling.js
More file actions
46 lines (37 loc) · 1.82 KB
/
Copy pathData_Modeling.js
File metadata and controls
46 lines (37 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// 1-create a data model to represent some of your classmates
<<<<<<< HEAD
var classmates=("samer", "fatima", "belal")
// -think of different attributes of your classmates? what do all of them have ?
// -create a factory function.
function ss(name,favourit sport){
return
name:name;
favourit sport: "favourit sport is:"+" "+favourit sport;
}
// -create an array to hold the classmates that you have created.
var classmates2=[];
function dd(i){
return
classmates2.push[i]
}
// -write a function called displayFriend that takes a mate as an argument and returns the important information in a readable way.
function displayFriend(mate){
for (var i=0; i<mate.length; i++)
r
}
// -write a function called addFriend that takes a mate as an argument and add it to you classMates array.
function addFriend(mate){
return classmates2.mate[i]
}
// -calculate the number of male friends that your class have by writing a function called nbOfMale.
// -Write a function searchMates that, given a query and an array of Mates,
=======
// -think of different attributes of your classmates? what do all of them have ?
// -create a factory function.
// -create an array to hold the classmates that you have created.
// -write a function called displayFriend that takes a mate as an argument and returns the important information in a readable way.
// -write a function called addFriend that takes a mate as an argument and add it to you classMates array.
// -calculate the number of male friends that your class have by writing a function called nbOfMale.
// -Write a function searchMates that, given a query and an array of Mates,
>>>>>>> bc6e2edad1c6d0c213c8f26ffb373fe17961ef71
// searche the array of mates for "matching" mate. You will decide what way you want to write in your search algorithm.