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
The test isn't very picky about the contents, is it? Even myArray.unshift(['paul','35']); passes, with the string '35' rather than the number 35.
The important part is that unshift is used correctly, which the test does check for. Still, the value indicated as correct for myArray probably should more closely match what is actually tested for.
Edited to add: The other neighboring array manipulation challenges (push/pop/shift) do not include the toLowerCase() in their tests which this challenge includes, so this is the odd one out in that regard. The others do also have loose equality for number values, however, so string forms of numbers are acceptable in each.
I totally understand that but if the Cases are checked for most of the results then why not this, sure this one is odd but consistency is key. Thanks though
@Akshit-p Oh, I'm not disagreeing with you, just adding more information 😄
I think the test for this challenge should be changed to remove the toLowerCase(), but I also think tests in all four of the challenges should use strict number comparison to ensure users are entering the correct values.
Challenge Name
Manipulate Arrays With unshift
https://www.freecodecamp.com/challenges/manipulate-arrays-with-unshift
Issue Description
The code doesn't check for the case entered for the array output.
Browser Information
Your Code
Screenshot
The text was updated successfully, but these errors were encountered: