From 5ffcd0f28484d3c700ccf62d4e213069a73af95c Mon Sep 17 00:00:00 2001 From: HiddenOgre28 <72028038+HiddenOgre28@users.noreply.github.com> Date: Fri, 7 Jan 2022 06:07:02 -0300 Subject: [PATCH] feat(curriculum): add log with function call to challenge (#44195) * fix (Curriculum) Added a log statement Added a log statement to the seed's content, referencing the function countOnline with a sample object as argument. The user should be able to see the result of the function printed out on the console as soon as it is ran, and it should be easier to understand what is being outputed by the function in this challenge. * Added examper users object --- ...-keys-of-an-object-with-a-for...in-statement.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.md index 5f2b085b6b..e19d8671c0 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-the-keys-of-an-object-with-a-for...in-statement.md @@ -116,11 +116,25 @@ const usersObj3 = { ## --seed-contents-- ```js +const users = { + Alan: { + online: false + }, + Jeff: { + online: true + }, + Sarah: { + online: false + } +} + function countOnline(usersObj) { // Only change code below this line // Only change code above this line } + +console.log(countOnline(users)); ``` # --solutions--