Skip to content

Commit df27a66

Browse files
authored
Improve test case of 4-do-while exercise (#48)
1 parent a6d200c commit df27a66

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Exercises/4-do-while.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
test: sum => {
1212
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');
1414
if (!src.includes('let')) throw new Error('Use let to define accumulator');
1515
if (!src.includes('return')) throw new Error('Use return');
1616
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017-2021 How.Programming.Works contributors
3+
Copyright (c) 2017-2023 How.Programming.Works contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Solutions/6-matrix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const max = matrix => {
3+
const max = (matrix) => {
44
let value = matrix[0][0];
55
for (let i = 0; i < matrix.length; i++) {
66
const row = matrix[i];

Solutions/7-ages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const ages = persons => {
3+
const ages = (persons) => {
44
const data = {};
55
for (const name in persons) {
66
const person = persons[name];

0 commit comments

Comments
 (0)