// random char/num 16 length
const id = "1234567890abcdef"
let deviceID = id.toUpperCase()
// cut deviceID per 4 char with -, no regexp
deviceID = deviceID.slice(0, 4) + "-" + deviceID.slice(4, 8) + "-" + deviceID.slice(8, 12) + "-" + deviceID.slice(12, 16)
console.log(deviceID)