Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JavaScript Golf

Paul Serby
March 18, 2015

JavaScript Golf

Terse Coding Challenges

Paul Serby

March 18, 2015
Tweet

More Decks by Paul Serby

Other Decks in Technology

Transcript

  1. WHY

  2. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards
  3. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code
  4. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code
  5. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code Will force you to have a deep understanding of the language
  6. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code Will force you to have a deep understanding of the language Make you a better coder
  7. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code Will force you to have a deep understanding of the language Make you a better coder Creative “Necessity is the mother of invention”
  8. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code Will force you to have a deep understanding of the language Make you a better coder Creative “Necessity is the mother of invention” Fun and addictive
  9. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code Will force you to have a deep understanding of the language Make you a better coder Creative “Necessity is the mother of invention” Fun and addictive Proves who really is most 1337
  10. WHY Has very little real world use Is often very

    inefficient Breaks all coding standards Creates unmaintainable code Will force you to have a deep understanding of the language Make you a better coder Creative “Necessity is the mother of invention” Fun and addictive Proves who really is most 1337 http://js1k.com/2014-dragons/
  11. EXAMPLE var out = [] for (var i = 0;

    i <= 30; i++) { out.push(i) } console.log(out) Normal
  12. EXAMPLE var out = [] for (var i = 0;

    i <= 30; i++) { out.push(i) } console.log(out) Normal Terse
  13. EXAMPLE var out = [] for (var i = 0;

    i <= 30; i++) { out.push(i) } console.log(out) out=[];for(i=0;i<31;out[i]=i++) console.log(out) Normal Terse