Creating unique lists in javascript is a common task, this is usually achieved by applying filters or for loops, but there is another way to accomplish this leveraging the Set object.
const list = [1, 2, 3, 5, 2, 5, 7];
const uniqueList = [...new Set(list)];
We pass the array of primitive values to the Set object; it creates a collection of unique values which is then converted to a list using the spread operator syntax and array literals.
I often work with large documents and very often I...
'Nick',
'Ivan'
I built a simple Nodejs watcher that is syncing changes...
const dataCsv = './sample_data.csv';
const mongodb = require("mongodb").MongoClient;
const csvtojson = require("csvtojson");
const fs = require('fs');
let url = "mongodb://yoururl";
Designed & Built by Mijo Kristo