File tree 3 files changed +6
-6
lines changed
solution/0000-0099/0006.Zigzag Conversion
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ func convert(s string, numRows int) string {
211
211
*/
212
212
var convert = function (s , numRows ) {
213
213
if (numRows == 1 ) return s;
214
- let arr = new Array (numRows);
214
+ const arr = new Array (numRows);
215
215
for (let i = 0 ; i < numRows; i++ ) arr[i] = [];
216
216
let mi = 0 ,
217
217
isDown = true ;
@@ -225,7 +225,7 @@ var convert = function (s, numRows) {
225
225
else mi-- ;
226
226
}
227
227
let ans = [];
228
- for (let item of arr) {
228
+ for (const item of arr) {
229
229
ans = ans .concat (item);
230
230
}
231
231
return ans .join (' ' );
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ func convert(s string, numRows int) string {
205
205
*/
206
206
var convert = function (s , numRows ) {
207
207
if (numRows == 1 ) return s;
208
- let arr = new Array (numRows);
208
+ const arr = new Array (numRows);
209
209
for (let i = 0 ; i < numRows; i++ ) arr[i] = [];
210
210
let mi = 0 ,
211
211
isDown = true ;
@@ -219,7 +219,7 @@ var convert = function (s, numRows) {
219
219
else mi-- ;
220
220
}
221
221
let ans = [];
222
- for (let item of arr) {
222
+ for (const item of arr) {
223
223
ans = ans .concat (item);
224
224
}
225
225
return ans .join (' ' );
Original file line number Diff line number Diff line change 5
5
*/
6
6
var convert = function ( s , numRows ) {
7
7
if ( numRows == 1 ) return s ;
8
- let arr = new Array ( numRows ) ;
8
+ const arr = new Array ( numRows ) ;
9
9
for ( let i = 0 ; i < numRows ; i ++ ) arr [ i ] = [ ] ;
10
10
let mi = 0 ,
11
11
isDown = true ;
@@ -19,7 +19,7 @@ var convert = function (s, numRows) {
19
19
else mi -- ;
20
20
}
21
21
let ans = [ ] ;
22
- for ( let item of arr ) {
22
+ for ( const item of arr ) {
23
23
ans = ans . concat ( item ) ;
24
24
}
25
25
return ans . join ( '' ) ;
You can’t perform that action at this time.
0 commit comments