In this exercise, your task is to create a generic function that will display information in a simple HTML element. The function should:
cards.js
and the
dictionaries in cars.js
Remember that the SAME function will take each dictionary as a parameter on TWO different calls and create the elements according to the contents of the dictionary - the code will not be changed.
You need to know that there is a built-in function called Object.keys()
that will return
a list of the keys given a
dictionary. It works in the following way:
Object.keys()
is the functionObject.keys(someDictionary)
as shown
here