You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No. Actually, Array(noOfBrains + 1) creates 5-element array of undefined which is then joined together with " Brain". As there are five elements there will be four joins.
AboutObjects.js line 32 has an expected answer of "They are Pinky and the Brain Brain Brain Brain" -- with 4 iterations of the string "Brain".
The actual pseudo code is:
The problem in question was:
If we indeed pass 4 as noOfBrains, since the method adds 1 to noOfBrains before joining them, would the result not have 5 "Brain"?
The text was updated successfully, but these errors were encountered: