Simple L-System implementation in JavaScript