What is the result of x at the end of this JavaScript snippe…
What is the result of x at the end of this JavaScript snippet? let vals = [1, 2, 6, 9];let x = 0;let i = 0;while (i < vals.length) { let currNum = vals[i]; if (currNum % 2 === 0) { // checks if currNum is even continue; } x = x + vals[i]; i = i + 1;}
Read Details