Name the Types
JavaScript
10 pts
Name the Types
Five variables are given. Create an array types that holds typeof of each variable, in this order: city, players, isOpen, coach, team. Do not type the words yourself — let typeof make them. Then print types, typeof types and Array.isArray(types). Expected output:
[ "string", "number", "boolean", "undefined", "object" ] object true
Checklist
- Build the array
typeswithtypeof. - Check the array with
Array.isArray(). - Print
types, its typeof, and the array check.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
