

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
OMDS Programming Questions OMDS Programming Questions
Typology: Cheat Sheet
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Problem: Given the Object below, find which kids like Basketball. var obj = { 'John': { 'Age': 12 , 'Hobbies': ['Computer Games', 'Football', 'Basketball'], }, 'Michael': { 'Age': 11 , 'Hobbies': ['Basketball', 'Baseball'] }, 'Sarah':{ 'Age': 10 , 'Hobbies': ['Reading Books', 'Dolls'] } }; SOLUTION:
// true console.log(checkAnagram('.', ',')); // true console.log(checkAnagram('Ba.sed!', 'da s_eb')); // false console.log(checkAnagram('2based1', 'sEd_ab')); // true console.log(checkAnagram('A decimal point', 'I’m a dot in place.')); // true console.log(checkAnagram('snooze alarms', 'Alas! No more Zs.')); function checkAnagram(string1, string2) { // do something here } Solution (JavaScript): Note: