Answers for "jsavascript transform base 64"

0

base 64 in js

// Define the string
var string = 'Hello World!';

// Encode the String
var encodedString = btoa(string);
console.log(encodedString); // Outputs: "SGVsbG8gV29ybGQh"

// Decode the String
var decodedString = atob(encodedString);
console.log(decodedString); // Outputs: "Hello World!"
Posted by: Guest on November-14-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language