Skip to content

Commit 672565f

Browse files
author
AmiyahJo
committed
fix: from 'let' to 'const' since my variables are never reassigned
1 parent fbcd463 commit 672565f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lesson_11/arrays_ts/src/lesson11.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export function getConcatenation(nums: number[]): number[] {
2-
let n: number = nums.length;
3-
let ans: number[] = new Array(2*n);
2+
const n: number = nums.length;
3+
const ans: number[] = new Array(2*n);
44

55
for(let i = 0; i < n; i++){
66
ans[i] = nums[i];
@@ -11,7 +11,7 @@ export function getConcatenation(nums: number[]): number[] {
1111
}
1212

1313
export function findWordsContaining(words: string[], x: string): number[] {
14-
let indices: number[] = [];
14+
const indices: number[] = [];
1515

1616
for (let i = 0; i < words.length; i++){
1717
if(words[i].indexOf(x) >= 0){

0 commit comments

Comments
 (0)