Animations

API

Arrays

Async

Basics

Challenges

Classes

Console

Dates

Debugging

DOM Elements

DOM Methods

DOM Navigation

DOM Properties

Event Listeners

Flow Control

Forms

Functions

Global Functions

JSON

Keywords

Libraries (3rd party)

Math

Modules

Objects

Snippets

String

Types

Widgets

Window Object

JavaScript - EncodeUri / DecodeUri

Sometimes we need to encode the characters in a url.


let example1 = "hello world.html?name=ricky bobby ";
document.getElementById("demo1").innerHTML = encodeURI(example1);


Sometimes we need to decode the characters which have been encoded.


let example2 = "hello%20world,%20how%20are%20you?";
document.getElementById("demo2").innerHTML = decodeURI(example2);