Question
This must be done in Javascript. Create an associative array called courses that stores a university department's course number as the key and an object
This must be done in Javascript.
Create an associative array called courses that stores a university department's course number as the key and an object as the value. The object has 3 properties: title, description, creditHours. Example courses:
170 - Introduction to Programming, Develop algorithms for computers, 5.
250 - Web Development, Build web applications, 3.
310 - Operating Systems, Process management and memory management, 3.
430 - Artificial Intelligence, Simulate human thinking, 2.
Output the total number of courses in the courses object using Object.keys(). Then, write a for-in loop that displays the course number and title for only those courses that are 3 credit hours.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started