I was assigned a task by my teacher
Upon completion, I received 2 warnings which my teacher does not appreciate
Can anyone assist me in resolving these warnings?
I attempted to fix the 2nd error by:
function (obj) {
or
obj =>
However, the warnings persist
1st warning
The object literal notation {} is preferable. (W010)
https://i.sstatic.net/Bq7p9.png
2nd warning
Functions declared within loops referencing an outer scoped variable may lead to confusing semantics. (a2, valslice, tit, a1) (W083)