Codewars: The Movie - Rated 12A (retired)
Description:
You're working as a ticket clerk at your local independent cinema, and it's the world premiere of Codewars:The Movie.
This film has been rated 12A, meaning that it's for audiences aged 12 or over.
Under 12's are allowed in as long as they are accompanied by an adult (someone aged 18 or over). But watch out, just because someone is old enough to watch Codewars: The Movie that doesn't mean they can accompany somone younger.
Management has given you the task of going through their online booking system to weed out anyone trying to sneak into what critics are already calling the film of the decade.
This would be your whole afternoon wasted, but luckily you think that you can write a javascript function that checks the parameters in seconds.
When given an array
of customer's ages, make sure that either
a) everyone is 12 or over
, or
b) there's at least one 18+ in the group
and return true
or false
depending on whether they can see Codewars: The Movie.
Good luck!
Similar Kata:
Stats:
Created | Jun 23, 2021 |
Warriors Trained | 21 |
Total Skips | 0 |
Total Code Submissions | 155 |
Total Times Completed | 17 |
JavaScript Completions | 17 |
Total Stars | 0 |
% of votes with a positive feedback rating | 38% of 12 |
Total "Very Satisfied" Votes | 4 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 12 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |