• IndexOf

    Back to a variable. Also this time there is a lot of text:

    let a = 0;
    
    a = a - "Strings can help to increment our variable with this number:".indexOf('1') // a = 1
    WAT?
  • Baseball bat

    This is first time when variable name isn’t a:

    let baseball_bat = 0;
    
    baseball_bat += 0==[[[[[[]]]]]] // BONK! baseball_bat = 1
    WAT?
  • unDEfined

    This one is more complex:

    let a = 0;
    
    a = a + (""+a[a])[3].charCodeAt() - (""+a[a])[2].charCodeAt(); // a = 1
    WAT?
  • Simple math

    Okay, here we go!

    First example is really tiny. Well, it’s still weird.

    let a = 0;
    
    a -=- 1; // a = 1
    WAT?