const str = 'foobar'; const base64EncodedStr = Buffer.from(str).toString('base64'); console.log(base64EncodedStr); // output: 'Zm9vYmFy'.
確定! 回上一頁