We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3ec810b + 946f7f6 commit 2e48fceCopy full SHA for 2e48fce
2 files changed
.eslintignore
@@ -35,4 +35,4 @@ exercises/scrabble-score
35
exercises/secret-handshake
36
exercises/simple-cipher
37
exercises/simple-linked-list
38
-exercises/trinary
+exercises/trinary
exercises/wordy/example.js
@@ -47,11 +47,11 @@ WordProblem.prototype.evaluate = function () {
47
var out = 0;
48
var m = this.matches;
49
50
- if (m[1] !== undefined && m[2] !== undefined && m[3] !== undefined) {
+ if ( (typeof m[1]) === 'string' && (typeof m[2]) === 'string' && (typeof m[3]) === 'string') {
51
out = this.operate(m[2], m[1], m[3]);
52
}
53
54
- if (m[4] !== undefined && m[5] !== undefined) {
+ if ( (typeof m[4]) === 'string' && (typeof m[5]) === 'string') {
55
out = this.operate(m[4], out, m[5]);
56
57
0 commit comments