Message from JavaScript discussions

June 2018

— Select all div elements with that class, then use the map method to change the inner text of each element toUpperCase

Message permanent page

— 

Map() is for the array, anyway do you has any example?
how about looping? does javascript support loop for something like this?

— Selecting elements by array gives you an array

— Selecting by class ie

— Actually a NodeList, but mapping won't help anyway

— You're not transforming elements, you're just mutating them

— .forEach

— Var elements =document.getElementByClass('desc' )
elements.map(element=>element.innerText=element.innerText.toUppercase()

Message permanent page

— Haven't tested this but you can try

— 1. NodeLists don't have .map
2. You're mapping elements to strings now, this would return a list of uppercased strings, which is pointless

Message permanent page

— Juzuz. its hot in here. i have about 40 degrees. questions are.. very simple, ye. never heard about getElementByClass. querySelectorAll i suppose..

Message permanent page

— It might be classname