v1.2
It all started with the BASIC script of Jan Willem, approx. 1987. I wanted to recreate the script but now with output in a browser. See below for a picture of the original.
This version skips the SIN() part of the script and just use Math.random() but visualy this version comes (for now) the closest to the BASIC script.
v1.0 > v1.1 changes
 Output rectangles with value of
a
What does the script do?

x
starts at0
(zero) and repeatedly increased by 0.3 as long it meetsx < 899.7
(exact 3000 steps) 
At every step the script calculates
a
:
x
multiplied by a random number between 0 (inc.) and 1 (exl.)
The outcome is rounded downwards. This givesa

a < 40
a black rectangle is printed (with the value ofa
)
a > 39
a white rectangle is printed (with the value ofa
)
original BASIC script
an original print out