Heim > Fragen und Antworten > Hauptteil
Wie erstelle ich Set()以数组形式的string存到localStorage?
Set()
string
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))