So I\'m rather new to JavaScript and I would love some help getting this code to work. I\'ve looked at multiple other posts talking about session storage as well as if/else
Edit: Clearly the answer above is much better than what i provided. I'll leave this here for future viewers - maybe the way I phrased things help someone sometime.
Taylor,
Two things.
sessionStorage()
is unique to each page/tab. From the docs "Opening a page in a new tab or window will cause a new session to be initiated"
window.onload
is expecting a function. You're just concatenating a string.
If you find a different way to pass information from one page to another (you could stuff it in the URL) your new color function should look something like this: