Skip to content

Commit da1c684

Browse files
committed
fix: made ans and output variables const
1 parent 20b1302 commit da1c684

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lesson_11/arrays_ts/src/lesson11.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* https://leetcode.com/problems/concatenation-of-array
44
*/
55
export function getConcatenation(nums: number[]): number[] {
6-
let ans: number[] = [...nums, ...nums];
6+
const ans: number[] = [...nums, ...nums];
77
return ans;
88
}
99

@@ -12,7 +12,7 @@ export function getConcatenation(nums: number[]): number[] {
1212
* https://leetcode.com/problems/find-words-containing-character/
1313
*/
1414
export function findWordsContaining(words: string[], x: string): number[] {
15-
let output: number[] = [];
15+
const output: number[] = [];
1616
for (let i = 0; i < words.length; i++) {
1717
if (words[i].includes(x)) {
1818
output.push(i);

0 commit comments

Comments
 (0)