Thank you for your comment

Beau­tiful Racket / racket school 2019

  1. var dbl = function(x) { x + x; };
    var prod = function(x, y) { x * y; };
    1
    2
    var dbl = function(x) { x + x; };
    var prod = function(x, y) { x * y; };
    
    copy to clipboard
  2. var dbl = function(x) { x + x; };
    var prod = function(x, y) { x * y; };
    dbl(42); // 84
    dbl(42 - 40); // 4
    prod(42, 50); // 2100
    1
    2
    3
    4
    5
    var dbl = function(x) { x + x; };
    var prod = function(x, y) { x * y; };
    dbl(42); // 84
    dbl(42 - 40); // 4
    prod(42, 50); // 2100
    
    copy to clipboard
  3. var a = 24.5;
    var b = "foo";
    a + a + b; // 49foo
    a + b + a; // 24.5foo24.5
    1
    2
    3
    4
    var a = 24.5;
    var b = "foo";
    a + a + b; // 49foo
    a + b + a; // 24.5foo24.5
    
    copy to clipboard
  4. alert(21 + 21 + "hello"); // ALERT! 42hello
    1
    alert(21 + 21 + "hello"); // ALERT! 42hello
    
    copy to clipboard
  1. function dbl(x) { x + x; };
    function prod(x, y) { x * y; };
    1
    2
    function dbl(x) { x + x; };
    function prod(x, y) { x * y; };
    
    copy to clipboard
← prev next →