Bagaimana pesan tetap ada di LocalStorage di JavaScript

// to save datalocalStorage.setItem('username', 'janedoe');// to access dataalert('Your username is '  + localStorage.getItem('username'));
Victorious Vole