learn2code lesson 1
by dirkcuys
HTML
<svg id="canvas"></svg>
JavaScript
/******* Stuff you don't need to understand *******/
function rectangle(x, y, width, height){
var draw = SVG('canvas');
var rect = draw.rect(width, height);
rect.transform({x: x, y: y});
}
function circle(x, y, radius){
var draw = SVG('canvas');
var circle = draw.circle(radius);
circle.transform({x: x-radius/2.0, y: y-radius/2.0});
}
/******* Your code below this line *******/