Javascript - Challenge
Code Life
By Pierre Marsaa
Save and Reload
Simulate a full save-and-reload cycle, and prove the reloaded team is a real, independent copy.
Step 1: saveTeam(team) returns the compact JSON text of the team, and prints "Saved N bytes" with the text's length.
Step 2: loadTeam(text) parses the text and returns the array.
Step 3: save team, then load the text into reloaded. Print one line per reloaded member as "name Lv.X".
Step 4: raise the first reloaded member's level by 10, then print "Original: X" and "Reloaded: X" with the two first-member levels, to show they are independent.
Expected output:
Loading editor...
↗️
Loading editor...
↶
↷
💡 Show Solution
Continue