const MongoClient = require('mongodb').MongoClient;
const uri = "mongodb+srv://Ax:<password>@cluster0-kskto.mongodb.net/test?retryWrites=true&w=majority";
const client = new MongoClient(uri, { useNewUrlParser: true });
client.connect(err => {
const collection = client.db("test").collection("devices");
// perform actions on the collection object
client.close();
});
Into a regular script but it keeps saying const is availible in es6????
const is a keyword that is only available in JS ES6. ES6 is not yet fully compatible in browsers where WebGL can be ran without it being transpiled (converted) to ES5.