File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ const tryCompileAndEvaluate = (eqnString) => {
21
21
success : true ,
22
22
equationOutcome,
23
23
} ;
24
-
25
24
} catch ( e ) {
26
25
return {
27
26
success : false ,
@@ -60,17 +59,16 @@ const evaluate = (equationString, target) => {
60
59
}
61
60
62
61
return outcomeAsNumber == target
63
- ? {
64
- success : true ,
65
- message : `Correct! \`${ equationString } \` = ${ target } , which is equal to the target.` ,
66
- ephemeral : false ,
67
- }
68
- : {
69
- success : false ,
70
- message : `Incorrect. \`${ equationString } \` = ${ outcomeAsNumber } , which is not equal to the target of ${ target } .` ,
71
- ephemeral : false ,
72
- } ;
73
-
62
+ ? {
63
+ success : true ,
64
+ message : `Correct! \`${ equationString } \` = ${ target } , which is equal to the target.` ,
65
+ ephemeral : false ,
66
+ }
67
+ : {
68
+ success : false ,
69
+ message : `Incorrect. \`${ equationString } \` = ${ outcomeAsNumber } , which is not equal to the target of ${ target } .` ,
70
+ ephemeral : false ,
71
+ } ;
74
72
} ;
75
73
76
74
module . exports = {
@@ -98,4 +96,3 @@ module.exports = {
98
96
} ) ;
99
97
} ,
100
98
} ;
101
-
You can’t perform that action at this time.
0 commit comments