Skip to main content
4 of 4
Rollback to Revision 2
Wheat Wizard
  • 102.9k
  • 23
  • 299
  • 697

Brain-Flak, 6 bytes

({}()) 

Try it online!

Explanation

What this does should be pretty clear. {} grabs a value from the stack, which implicitly zero to begin with, () adds one to it and (...) pushes the value. On the second run since there is already a 1 on the stack this just adds another 1 to it to make two. In fact if you copy the code n times it will always output n.

Wheat Wizard
  • 102.9k
  • 23
  • 299
  • 697