Write the code necessary to create a 300 pixel by 300 pixel <canvas>. Within it, paint a blue 100 pixel by 100 pixel square with
3 Answers
New AnswerEasy way
5/25/2020 3:45:06 PM
Manab Bist3 Answers
New Answer<canvas id="c" width="300" height="300"></canvas> <script> var canvas = document.getElementById( "c" ); var drawing_context = canvas.getContext( "2d" ); drawing_context.fillStyle = "blue"; drawing_context.fillRect( 50, 50, 100, 100 ); </script>
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message