forked from TelerikAcademy/JavaScript-Fundamentals
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
U-TELERIK\dminkov
authored and
U-TELERIK\dminkov
committed
Jun 3, 2015
1 parent
796bd58
commit 3b390d7
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Using Objects | ||
============= | ||
|
||
### Problem 1. Make person | ||
* Write a functio for creating persons. | ||
* Each person must have **firstname**, **lastname**, **age** and **gender** (true is female, false is male) | ||
* Generate an array with ten person with different names, ages and genders | ||
|
||
### Problem 2. People of age | ||
* Write a function that checks if an array of person contains only people of age (with age 18 or greater) | ||
* Use only array methods and no regular loops (for, while) | ||
|
||
### Problem 3. Underage people | ||
* Write a function that prints all underaged persons of an array of person | ||
* Use Array#filter and Array#forEach | ||
* Use only array methods and no regular loops (for, while) | ||
|
||
### Problem 4. Average age of females | ||
* Write a function that calculates the average age of all females, extracted from an array of persons | ||
* Use Array#filter | ||
* Use only array methods and no regular loops (for, while) | ||
|
||
### Problem 5. Youngest person | ||
* Write a function that finds the youngest male person in a given array of people and prints his full name | ||
* Use only array methods and no regular loops (for, while) | ||
* Use Array#find |