if else short form

Run Settings
LanguageJavaScript
Language Version
Run Command
// x = 1; // if (x>0) { // y = 1; // } else { // y =0; // } // y=x0? 1:0; // this is same as (line 1 - line 6) x = 1; z = 0; if (x>0) { y = 1; z = x + y } else { y =0; z = x - y } c = x>0? (()=>{y=1;z=x+y;})() : (()=>{y=0;z=x-y;}) ()// << short form (IIFE) console.log(y,z)
Editor Settings
Theme
Key bindings
Full width
Lines