Skip to content

Commit 4ede9c6

Browse files
committed
Iteration ironhack-labs#3.1 Completed v1
1 parent 5f30d25 commit 4ede9c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/functions-and-arrays.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function sum(numbers) {
7676

7777
for (let i = 0; i < numbersLength; i++) {
7878
if (typeof numbers[i] === "object") {
79-
throw new Error("Unsupported data type sir or a'am");
79+
throw new Error("Unsupported data type sir or ma'am");
8080
} else {
8181
if (typeof numbers[i] === "number") {
8282
sumAddition += numbers[i];

tests/functions-and-arrays.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('Bonus: Calculate the sum', () => {
121121

122122
it('should throw an error when unsupported data type (object or array) present in the array', () => {
123123
expect(() => sum([6, 12, 'miami', 1, 'barca', '200', 'lisboa', 8, [], {}])).toThrow(
124-
new Error("Unsupported data type sir or a'am")
124+
new Error("Unsupported data type sir or ma'am")
125125
);
126126
});
127127

0 commit comments

Comments
 (0)