Replies: 4 comments
-
I think what the question asks is to find the person who has the most skills. let max = Number.MIN_SAFE_INTEGER;
let res = undefined;
for (const key in users)
{
const user = users[key];
if (user.skills.length > max)
{
max = user.skills.length;
res = user;
}
} |
Beta Was this translation helpful? Give feedback.
-
Hey @AsadHusn , is this solution right for you?
|
Beta Was this translation helpful? Give feedback.
-
const txt = { "Alex": { "email": "alex@alex.com", "skills": [ "HTML", "CSS", "JavaScript" ], "age": 20, "isLoggedIn": false, "points": 30 }, "Asab": { "email": "asab@asab.com", "skills": [ "HTML", "CSS", "JavaScript", "Redux", "MongoDB", "Express", "React", "Node" ], "age": 25, "isLoggedIn": false, "points": 50 }, } |
Beta Was this translation helpful? Give feedback.
-
function getMostskill() { |
Beta Was this translation helpful? Give feedback.
-
const txt =
{ "Alex": { "email": "alex@alex.com", "skills": [ "HTML", "CSS", "JavaScript" ], "age": 20, "isLoggedIn": false, "points": 30 }, "Asab": { "email": "asab@asab.com", "skills": [ "HTML", "CSS", "JavaScript", "Redux", "MongoDB", "Express", "React", "Node" ], "age": 25, "isLoggedIn": false, "points": 50 }, }
Beta Was this translation helpful? Give feedback.
All reactions