Exercise 8.1

This commit is contained in:
Karan
2021-11-24 21:06:54 +05:30
committed by GitHub
parent 0d2ebf5c70
commit 46b30dcfd0
+13
View File
@@ -0,0 +1,13 @@
const secretMes1 = "How's%20it%20going%3F";
const secretMes2 = "How's it going?";
const decodedComp = decodeURIComponent(secretMes1);
console.log(decodedComp);
const encodedComp = encodeURIComponent(secretMes2);
console.log(encodedComp);
const uri = "http://www.basescripts.com?=Hello World";
const encoded = encodeURI(uri);
console.log(encoded);
How's it going?
How's%20it%20going%3F
http://www.basescripts.com?=Hello%20World