How come the “save” option was removed from the lab projects? I’ve been looking for it. Is this because I’m a non paying student? Oh well, there’s always the copy button, but just wondering…
I find it incredibly helpful to save my work. When I do a new lab, I’ll look at my old work for help remember how to code.
you can save to local storage with Ctrl+S or it’s saved automatically when you run the code. Then the code is removed from local storage once you submit the challenge.
As @ILM mentioned, even though there isn’t a dedicated Save button on the labs, you can press Ctrl + S and you’ll see a green banner come across that says “Saved! Your code was saved to your browser’s local storage.” when you’ve saved it.
On any lab that runs outside of FCC, it’s determined by that environment, but typically, it’s in a VS Code type setting, Ctrl + S is still your go to save option. I have not been through all of the external labs in the new curriculum, however.
Sure, there are some curriculums that require an environment outside FreeCodeCamp, and that’s what I’m defining as external in this context. I’m not sure of their saving mechanism, but I believe a lot of them are Vs Code oriented. Someone else who’s used them can give more information, though.
On FCC, in the labs like the one you posted, Ctrl + S works when you’re actively editing code (or at least have the mouse focused on the code editor). But if you click outside of the editor, Ctrl + S reverts back to its default functionality. Ctrl + S is not overridden globally on the page. It’s only overridden on the editor element.
It’s stored in your browser’s localStorage. That means that it is quite literally localized to not just your machine, but also to that specific browser. So, if you open up FCC in a different browser, it will not have the code you saved to local storage.
You can see it if you open up DevTools in Chrome. I usually hit F12 or right click on page anywhere → Inspect).
The keys they are stored under for FCC are under some kind of identifier that relates back to that specific part of a course so that it can be easily fetched from your local storage.