recherche

Maison  >  Questions et réponses  >  le corps du texte

Problèmes d'utilisation de ES6 Set()

Comment créer Set()以数组形式的string存到localStorage ?

淡淡烟草味淡淡烟草味2817 Il y a quelques jours571

répondre à tous(1)je répondrai

  • ringa_lee

    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))
    

    répondre
    0
  • Annulerrépondre