api.js
// filters the data with all unique items into a new array
filters the data with all unique items into a new array
filters the data with all unique items into a new array
function listUniqueItems(dataArray) {
    let uniqueItems = []
    dataArray.map(item => {
        if (uniqueItems.indexOf(item) == -1){
            uniqueItems.push(item)
        }
    })
    return uniqueItems
}
function listUniqueItems ( dataArray ) { let uniqueItems = [ ] dataArray . map ( item => { if ( uniqueItems . indexOf ( item ) == - 1 ) { uniqueItems . push ( item ) } } ) return uniqueItems }
filters the data with all unique items into a new array
filters the data with all unique items into a new array