"\n"+ "\\0/\n"+ " |\n"+ " / \\\n",
To break down those four lines of script: |
"\n"+ |
This starts a new frame. |
"\\0/\n"+ |
This is the first line showing the arms and head of the stick figure. The quotes start and end the line. One rule for using the character \ is that whenever you want it to print to the screen you must use 2, \\, because one \ is a javascript specific code which tells the program something else. So \\0/ Will print out as \0/. The ending, \n"+ belongs at the end of each line. The \n is a line break in javascript...similar to <br> in HTML. The end quote ends the line and the plus sign joins it to the next line. |
" |\n"+ |
This shows the body of the stick man. The spaces before the | are there to line it up under the head. You may have to play with lining things up, because some characters take up more space than other characters, so extra spacing may be needed in some cases. This is easier to do if you build your animation a couple of frames at a time. |
" / \\\n", |
This is the last line showing the legs. Again a double \\ is used to show the left leg. The comma at the end of the line ends the frame of the animation. The next frame starts just as this frame did. The very last frame omits the comma. |
\0/ | / \ |
This is the output of that script. |