var items = ['hi', 'hello', 'uzi']; var item = 'uzi';//change item here to unique item only then it will push if(items.indexOf(item) === -1) { items.push(item); console.log(items); }