Thank you for your comment

Beau­tiful Racket / racket school 2019

  1. var a = 1;
    var b = 2;
    a == b; // #false
    a != b; // #true
    1
    2
    3
    4
    var a = 1;
    var b = 2;
    a == b; // #false
    a != b; // #true
    
    copy to clipboard
  2. var a = 1;
    var b = 2;
    if ( a != b ) {
       alert("neq");
    }

    if ( a == b ) {
       alert("eq");
    } else {
       alert("still neq");
    }
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    var a = 1;
    var b = 2;
    if ( a != b ) {
       alert("neq");
    }
    
    if ( a == b ) {
       alert("eq");
    } else {
       alert("still neq");
    }
    
    copy to clipboard
    ALERT! neq
    ALERT! still neq
    1
    2
    ALERT! neq
    ALERT! still neq
    
    copy to clipboard
  3. var a = 0;
    while ( a != 5 ) {
        alert(a++);
    }
    1
    2
    3
    4
    var a = 0;
    while ( a != 5 ) {
        alert(a++);
    }
    
    copy to clipboard
    ALERT! 0
    ALERT! 1
    ALERT! 2
    ALERT! 3
    ALERT! 4
    1
    2
    3
    4
    5
    ALERT! 0
    ALERT! 1
    ALERT! 2
    ALERT! 3
    ALERT! 4
    
    copy to clipboard
  1. var a = 0;
    var b = 1;
    a < b; // #true
    a <= b; // #true
    a > b; // #false
    a >= b; // #false
    1
    2
    3
    4
    5
    6
    var a = 0;
    var b = 1;
    a < b;  // #true
    a <= b; // #true
    a > b;  // #false
    a >= b; // #false
    
    copy to clipboard
  2. var a = 0;
    var b = 1;
    a < b || a > b; // #true
    a < b && a > b; // #false
    1
    2
    3
    4
    var a = 0;
    var b = 1;
    a < b || a > b; // #true
    a < b && a > b; // #false
    
    copy to clipboard
  3. var a = 0;
    var b = 1;
    a < b ? "yes" : "no"; // "yes"
    1
    2
    3
    var a = 0;
    var b = 1;
    a < b ? "yes" : "no"; // "yes"
    
    copy to clipboard
← prev next →