draw with javascript code example Example: drawing with javascript var ctx = canvas.getContext("2d");