how can i put value of input text to local storage : im trying to add input text to local storage
<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

    document.getElementById('nick').value;localStorage.setItem('nick', value);

<!-- end snippet -->

