...
/Coding Challenge: Government Forms
Coding Challenge: Government Forms
Let's write a program to input forms and return the names of those forms which end with "cy".
We'll cover the following...
Problem statement
Complete the following program to compute and return the names of political forms ending with "cy"
.
Input
const governmentForms = [{
name: "Plutocracy",
definition: "Rule by the wealthy"
},
{
name: "Oligarchy",
definition: "Rule by a small number of people"
},
{
name: "Kleptocracy",
definition: "Rule by the thieves"
},
{
name: "Theocracy",
definition: "Rule by a religious elite"
},
{
name: "Democracy",
definition: "Rule by the people"
},
{
name: "Autocracy",
definition: "Rule by a single person"
}];
Expected output
[Plutocracy,Kleptocracy,Theocracy,Democracy,Autocracy]
Coding exercise
Access this course and 1400+ top-rated courses and projects.