Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 35

Tell us what’s happening:

The console is telling me " Before decrementing j , assign the value at j to the index j + 1. I’ve read the other forum post about this step but am still unable to figure out the solution from the vague responses on the other post.

Your code so far

while (j >= 0 && array[j] > currValue) {
array[j] = j + 1;
j–;
}

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Learn Basic Algorithmic Thinking by Building a Number Sorter - Step 35

I was just stuck on this for a bit as well. I only figured it out after I re-read the hint it gives when attempting to submit, paying close attention to the specific wording used. You are definitely on the right track with what you have in your code here though. Also, remember its two minus signs to decrement.

somebody said that exact same thing in the other forum and it didn’t help me either. Got any other advice?

In that case, I will say there are two things wrong with the one line of code in question (and the one I mentioned about decrementing in another line but I’m assuming you probably got that fixed). So, to give more specific hints for the two things that are wrong I will say, for the first, in your code, you have the code on one side of the = sign formatted correctly, and on the other side it is not formatted correctly, and both sides should be similarly formatted. As for the second issue, the side that is formatted correctly is on the wrong side.

After seeing it the correct way I now understand what you meant by re-reading the wording, that makes a lot more sense. Thank you!

This is the kind of helpful hinting that we need more of. It would also help if fCC would word the hints and instructions in the same direction as the code is to be written. I would say at this point it’s a little late in the JavaScript course to switch it up, but if they would start the first two lesson blocks with instructions that have the same structure as the syntax and incorporate how the code reads as we go it would save a lot of headache.

it’s not too late, the curriculum is still in beta and any feedback is welcome. If you have specific actionable feedback can you open an issue on the github repo?