Hello. Can you take a look at this code and see if it needs some tinkering?
Thanks a lot.
<script>
let names = ['Chris', 'Li Kang', 'Anne', 'Francesca', 'Mustafa', 'Tina', 'Bert', 'Jada']
let para = document.createElement('p');
// Add your code here
let canvas = document.querySelector('canvas');
let ctx = canvas.getContext('2d');
let x = 50;
let y = 60;
let width = 100;
let height = 75;
let color = 'blue';
// Add your code here
function rectangle() {
if (canvas.getContext) {
let ctx = canvas.getContext('2d');
ctx.clearRect(x, y, width, height);
ctx.fillRect(x, y, canvas.width, canvas.height);
ctx.fillStyle = 'blue';
}
}
rectangle();
// Don't edit the code below here!
const section = document.querySelector('section');
</script>