Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d14d503

Browse files
update var declaration
1 parent 345ba4d commit d14d503

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

‎starter-code/src/functions-and-arrays.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Find the maximum
22

33
// Finding Longest Word
4-
var words = [
4+
const words = [
55
'mystery',
66
'brother',
77
'aviator',
@@ -13,14 +13,14 @@ var words = [
1313

1414
// Calculating a Sum
1515

16-
var numbers = [6, 12, 1, 18, 13, 16, 2, 1, 8, 10];
16+
const numbers = [6, 12, 1, 18, 13, 16, 2, 1, 8, 10];
1717

1818
// Calculate the Average
1919

20-
var numbersAvg = [2, 6, 9, 10, 7, 4, 1, 9];
20+
const numbersAvg = [2, 6, 9, 10, 7, 4, 1, 9];
2121

2222
// Array of Strings
23-
var wordsArr = [
23+
const wordsArr = [
2424
'seat',
2525
'correspond',
2626
'linen',
@@ -34,7 +34,7 @@ var wordsArr = [
3434
];
3535

3636
// Unique Arrays
37-
var wordsUnique = [
37+
const wordsUnique = [
3838
'crab',
3939
'poison',
4040
'contagious',
@@ -49,7 +49,7 @@ var wordsUnique = [
4949
];
5050

5151
// Finding Elements
52-
var wordsFind = [
52+
const wordsFind = [
5353
'machine',
5454
'subset',
5555
'trouble',
@@ -60,8 +60,8 @@ var wordsFind = [
6060
'disobedience'
6161
];
6262

63-
// Counting Repetion
64-
var wordsCount = [
63+
// Counting Repetition
64+
const wordsCount = [
6565
'machine',
6666
'matter',
6767
'subset',
@@ -74,9 +74,10 @@ var wordsCount = [
7474
'disobedience',
7575
'matter'
7676
];
77-
// Bonus Quest
7877

79-
var matrix = [
78+
// Bonus
79+
80+
const matrix = [
8081
[8, 2, 22, 97, 38, 15, 0, 40, 0, 75, 4, 5, 7, 78, 52, 12, 50, 77, 91, 8],
8182
[49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 4, 56, 62, 0],
8283
[81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 3, 49, 13, 36, 65],

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /