Retired

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!

Fundamentals

Stats:

CreatedJun 23, 2021
Warriors Trained21
Total Skips0
Total Code Submissions155
Total Times Completed17
JavaScript Completions17
Total Stars0
% of votes with a positive feedback rating38% of 12
Total "Very Satisfied" Votes4
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes7
Total Rank Assessments12
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • cerealenjoyer Avatar
Ad