From 3e48e7c7fb1c37364ed96794a447b4ce46805e2d Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 24 Aug 2022 16:13:28 -0700 Subject: [PATCH] addresses issue #2200,2201,2209,2212,2217 --- content/lessons/js3/sublesson/objects.mdx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/content/lessons/js3/sublesson/objects.mdx b/content/lessons/js3/sublesson/objects.mdx index 429d401cc..457b2ca54 100644 --- a/content/lessons/js3/sublesson/objects.mdx +++ b/content/lessons/js3/sublesson/objects.mdx @@ -1206,7 +1206,7 @@ environment. 2. **Shape** ```jsx - const. headers = () => { + const headers = () => { } ``` @@ -1235,7 +1235,7 @@ environment. `

` tags. ```jsx - const ressult2 = headers(info) + const result2 = headers(info) // result2 is '

ironman: arrogant

spiderman: naive

hulk: strong

' ``` @@ -1311,7 +1311,7 @@ environment. ```jsx const result3 = headers(info) - // result3 is '

ironman

arrogant

spiderman

arrogant

hulk

strong

' + // result3 is '

ironman

arrogant

spiderman

naive

hulk

strong

' ``` @@ -1936,11 +1936,10 @@ object `{}`, to store the results. common element. ```jsx -;[9, 8, 7, 8, 7, 7, 7].getMostCommon()[ +;[9, 8, 7, 8, 7, 7, 7].getMostCommon() // returns 7 because it is the most common element - ('Batman', 8, 7, 'Batman', 'Robin') -].getMostCommon() +;['Batman', 8, 7, 'Batman', 'Robin'].getMostCommon() // returns "Batman" because it is the most common element ``` @@ -1993,7 +1992,7 @@ frequency, then store these little objects in an array. **Steps for Solution 1:** - - We need a local variable(let's call it `mapOfElments`) which stores the + - We need a local variable(let's call it `mapOfElements`) which stores the `reduce` method attached to `this`. - Inside the `reduce` method, build the object with the given array. - We need another local variable(let's call it `mostCommon`) which stores: