Skip to content

inexorabletash/jslogo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1d2dfbf · Sep 23, 2023
Mar 7, 2017
Jul 17, 2023
Jan 28, 2013
Sep 22, 2015
May 3, 2016
Jul 17, 2023
Jun 4, 2017
Sep 20, 2023
Jan 21, 2018
May 10, 2013
Aug 16, 2018
Sep 20, 2023
Jan 5, 2023
Sep 23, 2023
Jan 30, 2013
Sep 23, 2023
Feb 5, 2017
Sep 23, 2023
Sep 23, 2023

Repository files navigation

jslogo - Logo in JavaScript

This is hosted at https://inexorabletash.github.io/jslogo/ for playing with live.

Language Reference - this attempts to implement a subset of UCBLogo defined in in Brian Harvey's Computer Science Logo Style

Logo Examples

to star repeat 5 [ fd 100 rt 144 ] end
star
to square :length repeat 4 [ fd :length rt 90 ] end
repeat 36 [ square 50 rt 10 ]
to randomcolor setcolor pick [ red orange yellow green blue violet ] end
repeat 36 [ randomcolor square random 200 rt 10 ]
window pu repeat 72 [ setlabelheight repcount fd repcount * 2.5 label "Logo bk repcount * 2.5 rt 10 ]

Logo Links

To Do

  • Document deviations from UCB Logo standard
  • Make these examples all work: Logo 15-word challenge
  • Tail-call optimization
  • Make execution async so you can watch the turtle move