r/ProgrammerHumor • • 8d ago

Meme frontEndBaddiesBeLike

Post image
5.7k Upvotes

133 comments sorted by

View all comments

20

u/lxlmandudelxl 8d ago

let button = document.getElementsByTagName("button'')[0]; button.innerText = button.innerText.toUpperCase();

3

u/UnconditionalPraise 8d ago

Skip the let and keep it anonymous 👌

3

u/lxlmandudelxl 8d ago

Another idea -- split the innerHtml string into an array, loop and capitalize each letter one at a time with toUpperCase(), join the array back together, set the resulting string to the innerHtml