File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 241241 switch ( args . MATHMENU ) {
242242 case 'plus' :
243243 return new Promise ( ( resolve , reject ) => {
244- const timeInMilliseconds = ( args . input1 * 1000 ) + ( args . input2 * 1000 ) ;
244+ const timeInMilliseconds = ( args . input1 + args . input2 ) * 1000 ;
245245 setTimeout ( ( ) => {
246246 resolve ( ) ;
247247 } , timeInMilliseconds ) ;
248248 } ) ;
249249 case 'minus' :
250250 return new Promise ( ( resolve , reject ) => {
251- const timeInMilliseconds = ( args . input1 * 1000 ) - ( args . input2 * 1000 ) ;
251+ const timeInMilliseconds = ( args . input1 - args . input2 ) * 1000 ;
252252 setTimeout ( ( ) => {
253253 resolve ( ) ;
254254 } , timeInMilliseconds ) ;
255255 } ) ;
256256 case 'times' :
257257 return new Promise ( ( resolve , reject ) => {
258- const timeInMilliseconds = ( args . input1 * 1000 ) * ( args . input2 * 1000 ) ;
258+ const timeInMilliseconds = ( args . input1 * args . input2 ) * 1000 ;
259259 setTimeout ( ( ) => {
260260 resolve ( ) ;
261261 } , timeInMilliseconds ) ;
262262 } ) ;
263263 case 'divided by' :
264264 return new Promise ( ( resolve , reject ) => {
265- const timeInMilliseconds = ( args . input1 * 1000 ) / ( args . input2 * 1000 ) ;
265+ const timeInMilliseconds = ( args . input1 / args . input2 ) * 1000 ;
266266 setTimeout ( ( ) => {
267267 resolve ( ) ;
268268 } , timeInMilliseconds ) ;
269269 } ) ;
270270 case 'to the power of' :
271271 return new Promise ( ( resolve , reject ) => {
272- const timeInMilliseconds = ( args . input1 * 1000 ) ** ( args . input2 * 1000 ) ;
272+ const timeInMilliseconds = ( args . input1 ** args . input2 ) * 1000 ;
273273 setTimeout ( ( ) => {
274274 resolve ( ) ;
275275 } , timeInMilliseconds ) ;
You can’t perform that action at this time.
0 commit comments