JS passa dados entre as páginas

//first page
var favoritemovie = "Shrek";
sessionStorage.setItem("favoriteMovie", favoritemovie);

//second page
var favoritemovie = sessionStorage.getItem("favoriteMovie");
console.log(favoritemovie);
George_agg