Skip to content

Commit 13e6ca8

Browse files
committed
Added the not equals relational operator functionality
1 parent 65f48a2 commit 13e6ca8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/utilFunctions.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ function getCondition(splitWordsStartIndex) {
7070
condition += isNaN(splitWords[i]) ? '\'' + splitWords[i][0] + '\'' : splitWords[i];
7171
}
7272

73-
// add symbols accoding to relational operators
74-
// INCLUDE NOT EQUALS TO LIST
73+
// add symbols according to relational operators
74+
7575
if (splitWords[i+1] === 'greater' && splitWords[i+2] === 'equals') {
7676
condition += ' >= ';
7777
i += 3;
@@ -92,6 +92,10 @@ function getCondition(splitWordsStartIndex) {
9292
condition += ' == ';
9393
i += 2;
9494
}
95+
else if (splitWords[i+1]==='not' && splitWords[i+2] ==='equals'){
96+
condition += ' != ';
97+
i += 3;
98+
}
9599

96100

97101
// for RHS of condition, check if user said the word variable

0 commit comments

Comments
 (0)