History of 2016-12-31 JavaScript head

2016-12-31
17:37 UTC Revision 1 . . . . Marcin BorkowskiSome time ago I needed an equivalent of Unix’ head utility in JavaScript. I had a string, spanning many lines, and I wanted to have just the first 10 lines of it. It turned out that this is actually very easy to do so: