MCQs > IT & Programming > JavaScript > You want a dictionary-like data object such that you can give it the word to look up and it gives you the definition. Which of the following would create such an object and log a look-up to the console?

JavaScript MCQs

You want a dictionary-like data object such that you can give it the word to look up and it gives you the definition. Which of the following would create such an object and log a look-up to the console?

Answer

Correct Answer: var dictionary = {"cat" : "domestic pet known for attitude", "dog" : "domestic pet known for loyalty", "fish" : "aquatic animal sometimes made a domestic pet"}; console.log( dictionary.dog );

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it