From a23b4a5b33f77b34c22062c1d9a8e8f652851c24 Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Mon, 11 Mar 2024 02:17:36 +0100 Subject: [PATCH] prefer `let` to `var` --- jqClock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jqClock.js b/jqClock.js index 3926613..9e14ca8 100644 --- a/jqClock.js +++ b/jqClock.js @@ -589,7 +589,7 @@ if (!Number.prototype.map) { let dateStr = ""; let chr; const { myoptions } = clk; - for (var n = 0; n <= myoptions.dateFormat.length; n++) { + for (let n = 0; n <= myoptions.dateFormat.length; n++) { chr = myoptions.dateFormat.charAt(n); if( chr in dateFormatCharacters ) { dateStr += dateFormatCharacters[chr]( clk ); @@ -613,7 +613,7 @@ if (!Number.prototype.map) { let timeStr = ""; let chr; const { myoptions } = clk; - for (var n = 0; n <= myoptions.timeFormat.length; n++) { + for (let n = 0; n <= myoptions.timeFormat.length; n++) { chr = myoptions.timeFormat.charAt(n); if( chr in timeFormatCharacters ) { timeStr += timeFormatCharacters[chr]( clk );