I had a problem where after pressing ‘check your code’, no error message came in the ‘check your code section’ in Step 27 of Javascript Algorithms and Data Structures(Beta). I was not aware that we could not initialize and declare same variable in seperate lines because I thought it could be done in python. But the console window did show what syntax error I had in my code.
So my suggestion/simple solution is:
The website automatically closes the console window but it doesnt close the preview window while going to next task/step after completing the task. I have to open the console window every time. If console window was forced open every time while doing javascript code, then I could have easily seen the syntax error and fixed it. Or if it would not automatically close every step.
We have this issue here
opened 01:39PM - 28 Dec 23 UTC
type: bug
status: discussing
new javascript course
### Describe the Issue
If the student opened console tab while doing some chall… enge step
then, after submitting correct solution for the step, and being redirected to next challenge step,
they will end up with the console tab being closed.
Such flow may be considered not the best user experience, especially for users, who would prefer to have the console tab always opened while working with JavaScript code.
### Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8
### Steps to Reproduce
1. Go to some challenge step. I guess any would do, but I will drop a link to one of them. <https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-string-and-array-methods-by-building-a-music-player/step-35>
2. Open the console.
3. Complete the challenge. The correct solution for the one mentioned above is to add the line `pauseButton.addEventListener("click", pauseSong);`
4. Hit the `Submit and go to next challenge` button.
5. After being redirected to the next step's page, you should see that the console is closed again.
### Expected behavior
I see two possible options for the expected behaviour:
#### To make console be opened always by default
My personal opinion is that it would be more comfortable for working with JS, rather than have console closed by default. This is subjective though. It may be not the best experience for those who would prefer to use console only from time to time while going through lessons.
As an example of such experience, the old **JS course** or React lesson from **Front End Development libraries** course may be used.
<https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/>
<https://www.freecodecamp.org/learn/front-end-development-libraries/#react>
#### To make console be opened or closed based on the console state from previous challenge
If I would have the console opened while doing this step <https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-string-and-array-methods-by-building-a-music-player/step-35>,
after completing challenge and going for next one (<https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-string-and-array-methods-by-building-a-music-player/step-36>),
console should be also opened.
### Screenshots
_No response_
### System
- Device: Laptop
- OS: Windows 10
- Browser: Chrome
- Version: [e.g. 22]
### Additional context
_No response_
But it looks like this feature might not be possible for mobile based on the recent comments.
There is still discussion around it so I don’t know where the team landed with this one