'use strict'; const formatter = { prefix: 'ORD', format(id) { return `${this.prefix}-${id}`; }, }; console.log(['7', '8'].map(formatter.format));