Skip to content

Commit 81dbb0a

Browse files
authored
Update telephoneNumberValidator.js
1 parent 1e83535 commit 81dbb0a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

telephone-number-validator/telephoneNumberValidator.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ var validFormats = [
77

88
function telephoneCheck(str) {
99
return validFormats.reduce((isValid, format) => {
10-
if (format.test(str)) {
10+
if (format.test(str))
1111
return true;
12-
} else {
13-
return isValid
14-
}
12+
else
13+
return isValid;
1514
}, false);
1615
}

0 commit comments

Comments
 (0)