Hi,
I just completed the first of the three assignments and I see that I’m one of the few using forEach instead of a regular For-loop. Could this be assessed?
Thanks!
Hi,
I just completed the first of the three assignments and I see that I’m one of the few using forEach instead of a regular For-loop. Could this be assessed?
Thanks!
Hello @Ekeblad
you doing great well done and you can improve the code more if you like
function addListItem(item) {
console.log(item);
const listItem = document.createElement("li");
listItem.textContent = item;
list.appendChild(listItem);
}
item will be each element using the foreach and since we do not need anything else then no need for index
check this for more details about foreach for array
hope that help and have a nice day
@justsomeone: Your probably wanted to link to
No WebXR exercises on MDN yet
ops i am guilty
@mikoMK thanks for correcting me well done boss
@Ekeblad sorry use the link that @mikoMK mention mine is wrong
and have a nice day both of you
Hi @justsomeone,
I have looked into your suggestion and it does the same as mine did with a few rows more and one more input which was not used in this case. Thanks for the help!
Have a nice day!
you very welcome @Ekeblad and thanks a lot