I watch the video course "programming lessons" from loftblog, the theme is cycles. Faced a problem - I completely rewrite the code itself, as in the video. Everything works for them, for me, no. Here is the code:
var arr = [1,2,3,4,5]; for(i=0; sum=0; i<arr.length; i++) { sum+=arr[i]; }; console.log(sum); this is what the console issues:
"SyntaxError: Unexpected token ; at https://static.jsbin.com/js/prod/runner-4.1.4.min.js:1:13924 at https://static.jsbin.com/js/prod/runner-4.1.4.min.js:1:10866" in the comments to the video a few more people write that this code does not work for them. What is the problem?