I was trying to fiddle with toLocaleLowerCase()
and toLowerCase()
methods.
function ByLocale() {
document.getElementById(demo).innerText.toLocaleLowerCase();
}
function ByLower() {
document.getElementById(demo).innerText.toLowerCase();
}
<p>Click the button to convert the string HELLO World! to lowercase letters.</p>
<button onclick=ByLocale();>By Locale LowerCase</button>
<button onclick=ByLower();>By LowerCase</button>
<p id=demo>HELLO World!</p>
My questions are:
- What is Locale, because both the functions seems to return similar output?
- What is the difference between these two methods?
- Why is the fiddle code not getting executed?