Home > Q&A > body text
How to save the created Set() in the form of an array to localStorage?
Set()
localStorage
ringa_lee2017-05-18 10:51:19
let a = new Set([1,2,3]); let b = Array.from(a); localStorage.setItem("somename",JSON.stringify(b))