diff --git a/apps/pie/app.js b/apps/pie/app.js index 69b67d3bd..74f4b4575 100644 --- a/apps/pie/app.js +++ b/apps/pie/app.js @@ -11,7 +11,7 @@ function scrollX(){ gfx.clearRect(0,gfx.getHeight()*(1/4),gfx.getWidth(),0); gfx.scroll(0,gfx.getHeight()/4); score++; - if(typeof(m) != undefined && score>0){ + if(typeof m !== 'undefined' && score>0){ clearInterval(m); m = setInterval(scrollY,Math.abs(100/score+15-0.1*score));} gfx.setColor(1,1,1); diff --git a/apps/scribble/app.js b/apps/scribble/app.js index 99ee3f717..319a02d2c 100644 --- a/apps/scribble/app.js +++ b/apps/scribble/app.js @@ -368,8 +368,8 @@ class TextBox { // x and y are the center points this.x = x; this.y = y; - this.text = (typeof text !== undefined) ? text : "Default"; - this.col = (typeof col !== undefined) ? col : red; + this.text = text || "Default"; + this.col = col || red; // console.log(`Constr TextBox ${this.text} -> Center: (${this.x}, ${this.y}) | Col ${this.col}`); }