Create encode

This commit is contained in:
LSvekis
2021-10-11 17:17:05 -04:00
committed by GitHub
parent 02cf947995
commit b10f8ac747
+9
View File
@@ -0,0 +1,9 @@
const secretMes1 = "How's%20it%20going%3F";
const secretMes2 = "How's it going?";
const encodedComp = encodeURIComponent(secretMes1);
console.log(encodedComp);
const decodedComp = decodeURIComponent(secretMes2);
console.log(decodedComp);
const uri = "http://www.basescripts.com?=Hello World";
const encoded = encodeURI(uri);
console.log(encoded);