Easy Flags: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
No edit summary  | 
				|||
| Line 11: | Line 11: | ||
function drawFlag(ctx)  | function drawFlag(ctx)  | ||
{  | {  | ||
   ctx.  |    ctx.fillStyle = 'green';  | ||
   ctx.fillRect(0,0,75,100);  |    ctx.fillRect(0,0,75,100);  | ||
}     | }     | ||
| Line 18: | Line 18: | ||
function drawFlag(ctx)  | function drawFlag(ctx)  | ||
{  | {  | ||
   ctx.  |    ctx.fillStyle = 'green';  | ||
   ctx.fillRect(0,0,150,100);  |    ctx.fillRect(0,0,150,100);  | ||
}     | }     | ||
</pre>  | </pre>  | ||
</div>  | </div>  | ||
Revision as of 10:23, 1 August 2021
<canvas width=150 height=100></canvas>
drawFlag(document.querySelector('canvas').getContext('2d'));
Libya
What is 6 times 7?
function drawFlag(ctx)
{
  ctx.fillStyle = 'green';
  ctx.fillRect(0,0,75,100);
}  
function drawFlag(ctx)
{
  ctx.fillStyle = 'green';
  ctx.fillRect(0,0,150,100);
}