From 46b30dcfd024c84b7a4c43ec437aa8188f9a9f56 Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Wed, 24 Nov 2021 21:06:54 +0530 Subject: [PATCH] Exercise 8.1 --- Chapter 8/Exercise 8.1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Chapter 8/Exercise 8.1 diff --git a/Chapter 8/Exercise 8.1 b/Chapter 8/Exercise 8.1 new file mode 100644 index 0000000..f55c43e --- /dev/null +++ b/Chapter 8/Exercise 8.1 @@ -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