Skip to content
Advertisement

How can I get “START!” to print after the first line of asterisks when I run it, rather than just the changes of direction?

It will print start and stop, but not on the first line? How can I get “START!” to print after the first line of asterisks when I run it, rather than just the changes of direction?

JavaScript

Advertisement

Answer

How about just adding a print statement before the while loop and initializing indent at 1 instead of 0?

JavaScript
Advertisement