[RESOLVED] Challenge - Stand in Line

yeah, so, the Challenge “Stand in Line”, has HORRIBLE instructions that reference nothing to do with using push(), shift(), return(), console.log, JSON.stringify.

Added to this: are the checks at the bottom and the code console gibberish.

WHERE, in previous challenges, were we exposed to push(), shift(), return(), console.log, JSON.stringify???

I searched the Help/Questions for “Stand in Line” and found what to code and why it worked, but the challenge itself is all over the place and makes a BUNCH of huge assumptions about perceived previous knowledge.

using google just adds to the level of frustration, returning results on algorithms, objects, stacks and all sorts of nomenclature a BEGINNER at this stage has no idea what this stuff is/does.



Yes this was a frustrating one because the 3 lines below // Display Code are just there for the console. Don’t worry about them. Just work on the // Change this line area.
JSON and stringify will be introduced later.

As for push(), shift(), return(), console.log these were introduced in earlier challenges. Are you doing them in order?


There are 4 challenges called Manipulate Arrays … which shows you most of what you need to know for this one.


And…the idea is to let you figure out things for yourself. The instructions are sometimes vague. They won’t always give you all the info. Frustrating yes, but also a very good learning experience. The research you do to figure out a challenge is invaluable.

1 Like

I’m sorry this was frustrating for you. It’s not easy to create learning material that satisfies everyone’s needs or expectations, but the volunteers who run Free Code Camp are constantly working to improve the curriculum. Because there’s so much to teach, there’s also a lot to learn, and going through the challenges quickly can lend a false sense of mastery where the feeling should be more like introduction. I’d suggest taking some time now to look over the challenge map and review the lessons for any terms you don’t recognize. Maybe take notes or make yourself some flash cards, if that’s your style.

Hope to see you contributing projects soon!


@Soupedenuit Thank you, I only spotted them after @PortableStick posted.

At this point, slowing down is the best idea ever. Cranking out these challenges as fast as possible is way too nerve racking.


I’m adding another horrible instruction to the mix -

-Comparison with the Inequality Operator -

1 != 2 // true
1 != “1” // false
1 != ‘1’ // false
1 != true // false
0 != false // false

but the Checks:
testNotEqual(99) should return "Equal"
testNotEqual(“99”) should return "Equal"
testNotEqual(12) should return "Not Equal"
testNotEqual(“12”) should return "Not Equal"
testNotEqual(“bob”) should return “Not Equal”

I ran my code and changed the test value, guess what? They don’t match the examples.

// Setup
function testNotEqual(val) {
  if (val != 99) { // Change this line
    return "Not Equal";
  return "Equal";

// Change this value to test

results in; “Equal”, now if we followed the examples about data, this “99” or ‘99’ is a string and this 99 is a number, should result in “Not Equal”.

Welcome to JavaScript :tada::tada::tada:

This is something that confuses experienced developers coming from other, more strict languages as well. JS has two equality operators: equals (==) and strictly equals (===). What you are expecting is the strictly equals behavior. Take another look at the examples.

1 != "1" // false
1 != '1' // false

In other words

1 == "1" // true

Strictly speaking…

1 === "1" // false
1 !== "1" // true

thanks for the clarification @PortableStick

but a string is not a number and it would seem from the examples that the equality operators ignore this until we use === then it works as a true equality operator, but it doesn’t error out when it sees a string when expecting a number … this is wonky

We all share parts of your frustration in general, and the good news is that you are learning enough that you are able to articulate your frustrations. That means that while you may not know how to submit pull requests or work on an applicatoin as big as FCC, you can contribute in a meaning ful way to improve the experience of other campers by submitting an “issue” rather than posting a complaint on the forums.

The challenges are built to even make it really easy for you to browse all the other issues for that challenge without searching…that’s easier than coming to the forums!

Just click on “bug” and pick an option. If you still have an issue and constructive suggestions, open a new issue

1 Like

equality operators convert data types

does the strictly equals operator (===), convert data types?

Nope, and that’s their main difference. The equality operator (==) performs type coercion, which is the behavior we’re seeing in your example. It forces strings to other data types to try to get a match. Strict equality checks do not coerce types, which is often the desired behavior and ends up being a bit faster.

1 Like

that makes more sense now … thank you

1 Like