JS melewati data antar halaman

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

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