Tell us what’s happening:
Hi everyone!
For some reason this task was already done when I got to it, I didn’t do it. I just read the task, look at code, it was weird cause it seemed complete. I decided to check, hit the the Run test button, and it said that it’s done. How is it possible? Why was it done before I did it?
Your code so far
const s = [5, 7, 2];
function editInPlace() {
'use strict';
// Only change code below this line
s[0] = 2;
s[1] = 5;
s[2] = 7;
// Using s = [2, 5, 7] would be invalid
// Only change code above this line
}
editInPlace();
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36.
No I didn’t. I just do all in oder. So I did the previous one, come to this one and saw that it’s already done. I don’t know why. It’s OK with me, just don’t think it should work like this.
the code is saved in browser cache, if you share the computer with someone else this can happen. or if you helped someone on the forum with this challenge
I don’t think I did. the site has similar task in Basic JScrip (about how to change data in array). And here is the same challange but about const and var thing. Could it be that these two task are connected? And this one is done cause I did the one in Basic JS? Can you check it?
Plus, all the other tasks that I have done before are empty again when I open them 2nd, 3d etc time. So it should be empty too even if I did it before (but I didn’t do it anyway)
Yes, and that is why I’m asking and I don’t know why. Cause I only started to do ES6 yesterday evening I think but I’m sure it was after this post where I helped so I was in Basic JS when I answered that post.
I don’t know why it was complete and I have already gone to the next challenges. I just wanted to warn if there is some problem or bug. If not I’m sorry. I was just worrying.
the challenge you helped for is in the es6 section, so if you typed code in it to see how it worked to help the user, then that is the code you found reaching that challenge in your normal progression
you found code in the editor, because you had already opened that specific challenge and typed in it
Ok, but why is there? I mean, when I open challenges that I already passed (like now I went and open any Basic JS challenge) there is no code that I wrote previously in it. Yes, I passed it but the code isn’t saved there (I can do a screenshot if needed). So why this one has a code (I mean even if I passed it why it’s not working like other challenges that I passed)?
I might be wrong, but it seems if you are logged in and pass the test it maybe saves the “completed” state to your profile but then clears the code. Again, I haven’t actually looked at the code so it’s just speculation.
Not sure why it (if true) is done like that. I would like for it to remember the code just like when I’m not logged in.
Edit: It doesn’t seem to matter how I submit the code.
Oh! so maybe I went to help and cause it wasn’t in order for my challenges and it was a little bit ahead I decided to not submit it and that is why it was saved.
Ok! now I understand. Thank you very much!!