Jaedsada.me
    Example Me

    ทำ Javascript array unique


    ** Updated for ES6/ES2015:

    ตัวอย่างการ Array

    let items = [a,a,b,b,c,d]

    การใช้งาน

    let items = [a,a,b,b,c,d]
    let uniqueItems = Array.from(new Set(items))
    console.log(uniqueItems)

    ผลลัพธ์

    /// [a,b,c,d]

    ** สามารถ ใช้เป็น **.
    Spread syntax

    var uniqueItems = [...new Set(items)]
    July 30, 2020

    อื่นๆ

    • ทำ Javascript array unique
    • ( บันทึกกันลืม ) การทำงานของ NodeJS
    • ( บันทึกไว้กันลืม ) What is JavaScript
    • ทำ GraphQL ด้วย Nodejs
    • ลองทำ PWA ด้วย Vanilla JavaScript
    • Delete ALL node_modules folders on My computer
    • Vue + Leaflet Map แบบเร็วๆ
    Back
    ทำ Javascript array unique( บันทึกกันลืม ) การทำงานของ NodeJS( บันทึกไว้กันลืม ) What is JavaScriptทำ GraphQL ด้วย Nodejsลองทำ PWA ด้วย Vanilla JavaScriptDelete ALL node_modules folders on My computerVue + Leaflet Map แบบเร็วๆ