File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 10
10
],
11
11
test: sum => {
12
12
const src = sum.toString();
13
- if (!src.includes('while (')) throw new Error('Use while loop');
13
+ if (!src.includes('do {') || !src.includes('} while (')) throw new Error('Use do... while loop');
14
14
if (!src.includes('let')) throw new Error('Use let to define accumulator');
15
15
if (!src.includes('return')) throw new Error('Use return');
16
16
}
Original file line number Diff line number Diff line change 1
1
MIT License
2
2
3
- Copyright (c) 2017-2021 How.Programming.Works contributors
3
+ Copyright (c) 2017-2023 How.Programming.Works contributors
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const max = matrix => {
3
+ const max = ( matrix ) => {
4
4
let value = matrix [ 0 ] [ 0 ] ;
5
5
for ( let i = 0 ; i < matrix . length ; i ++ ) {
6
6
const row = matrix [ i ] ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- const ages = persons => {
3
+ const ages = ( persons ) => {
4
4
const data = { } ;
5
5
for ( const name in persons ) {
6
6
const person = persons [ name ] ;
You can’t perform that action at this time.
0 commit comments