Javascript String base64 encode via Buffer
let a = Buffer.from('computer program').toString('base64') console.log(a);