Javascript provides toUpperCase and toLowerCase functions on the String object prototype that allows conversion of strings to uppercase and lowercase with vanilla JavaScript.
let str = "Hello World" let upper = str.toUpperCase() console.log(upper)
This will give the output −
HELLO WORLD
let str = "Hello World" let lower = str.toLowerCase() console.log(lower)
This will give the output −
hello world