how to make all lowercase in js

JavaScript
 var str = "Hello World!";
var res = str.toLowerCase();
 
Source

Also in JavaScript: