+ 2
Can Some explain to why is this code not working in sololern JavaScript playground
var name = [1,2,3,4,5]; name.forEach(function add10(name){ name+=10; console.log(name) });
1 ответ
+ 2
While I can't state offically, I'm guessing because the forEach is a relatively new addition to the language and SoloLearn is slow to update their supported language versions that they haven't gotten to it as yet. There is a huge backwards compatiblility testing that needs to be completed prior to supporting a new version of a language, after all it is better to not support an update than break a million customers usage of the language.