Skip to content

Commit 89c2b42

Browse files
committed
build(javascript): use let instead of var for local variables
1 parent c96f043 commit 89c2b42

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

javascripts/DOM - NATO spell selection.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ if (selection === undefined || selection.length === 0) {
4747
window.alert("Select the desired text.");
4848
} else {
4949
selection = selection.trim();
50-
var result = "";
51-
var i, c, d, t;
50+
let result = "";
51+
let i, c, d, t;
5252
for (i = 0; i < selection.length; i += 1) {
5353
c = selection.charAt(i);
5454
d = encodeURIComponent(c);

javascripts/Google Maps to SunCalc.org.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ for (i = 0; i < pieces.length; i += 1) {
1212
if (coordinates === undefined || coordinates === null) {
1313
window.alert("Current Google Maps URL does not contain coordinates.");
1414
} else {
15-
var now = new Date();
15+
let now = new Date();
1616
window
1717
.open(
1818
"https://www.suncalc.org/#/" +

javascripts/NIST NVD - Go to selected CVE.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (selection === undefined || selection.length === 0) {
99
window.alert("Select the desired text.");
1010
} else {
1111
selection = selection.trim();
12-
var url;
12+
let url;
1313
if (selection.match(/^cve-\d+-\d+$/i)) {
1414
url = "https://nvd.nist.gov/vuln/detail/" + selection;
1515
} else if (selection.match(/^\d+-\d+$/)) {

0 commit comments

Comments
 (0)