JavaScript studying bug

Hi, I don’t know if this is a bug or not, I’m just a newbie, but this moment made me doubt.
I was learning JavaScript and doing step 22. During the work, I misunderstood the task, but at the same time I began to complete it. When I finished writing the code and sent it for review, my code passed the review, but at the same time I saw a strange result on the console and this forced me to re-examine the task and the code that I wrote. Then I corrected my code and submitted it again for review, the new code also passed the review, but the console displayed what was required by the assignment. It seems to me that the code from my first attempt should not have passed the test. Sorry if I’m wrong. The system won’t let me attach screenshots.

note that you need to reload the page to reset the tests, otherwise they keep to pass from the first time.

Please share the code you have used. Please share the link to the step (step 22 of which project???)

Remove spaces (screenshots)
htt ps://post
htt ps://post