Abbreviation of a js Code

  node.js, question
Filename = dbpath plus picker';
 pickerDB = new Datastore(options);
 Filename = dbpath plus data';
 dataDB = new Datastore(options);
 Filename = dbpath plus 'web';
 webDB = new Datastore(options);
 Filename = dbpath plus 'url';
 urlDB = new Datastore(options);
 Filename = dbpath plus attach';
 attachDB = new Datastore(options);
 Filename = dbpath plus cacheUrl';
 cacheUrlDB = new Datastore(options);
 Filename = dbpath plus cache';
 cacheDB = new Datastore(options);
 Filename = dbpath plus cron';
 cronDB = new Datastore(options);
 Filename = dbpath plus 'log';
 logDB = new Datastore(options);
 Filename = dbpath plus cronLog';
 cronLogDB = new Datastore(options);

Please consult, this paragraph is all copy and paste. Can I use simpler code to do it all at once?

I don’t know if it is the abbreviation in your mind, I think from the perspective of repetition, we can extract different parts to make an array, and abstract the same parts as follows:

let options = {},
 dbPath = '';  //TBD by yourself
 
 let stores = [
 'picker',
 'data',
 'web',
 'url',
 'attach',
 'cacheUrl',
 'cache',
 'cron',
 'log',
 'cronLog']
 . map (key = > (options.filename = dbpath plus key, new Datastore(options)));
 
 
 console.log(stores);  //stores you want