-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathW2D4.js
16 lines (12 loc) · 865 Bytes
/
W2D4.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//1.Write a function called sameLength that takes two strings as parmeters,
//and returns true if those strings have the same length, and false otherwise.
//2.Write a function called passwordLongEnough that takes a 'password' as a parameter
//and returns true if that password is long enough -- you get to decide what constitutes long enough.
//3.Write a function called rentalCar that takes a person's name and age as parmeters,
//and returns either 'You cannot have the keys, .', or "Have fun driving",
// depending on whether or not the person is old enough.
//In the US, most rental car companies do not allow you to rent a car until you are 21.
// 4.Write a function called max that takes two numbers as parameters,
//and returns the larger one.
// 5.Write a function called min that takes two numbers as parameters,
// and returns the smaller one.