From 67d44696354ab8c3d3c0e0da7ddbc0d1bdfec476 Mon Sep 17 00:00:00 2001 From: Basanta Maharjan Date: Thu, 19 Dec 2024 07:46:43 +0545 Subject: [PATCH] fix: Unexpected var, use let or const instead. --- js-experiments/3-animation/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js-experiments/3-animation/script.js b/js-experiments/3-animation/script.js index 49008c6..ab0ff40 100644 --- a/js-experiments/3-animation/script.js +++ b/js-experiments/3-animation/script.js @@ -10,14 +10,14 @@ var numCols =15; function drawBall(){ ctx.clearRect(0,0,canvas.width,canvas.height); phase = frameCount * speed; - for(var i =0; i<2;i++){ + for(let i =0; i<2;i++){ if(i==0){var strandPhase = phase;} else{var strandPhase = phase +Math.PI}; - for(var col=0; col