I am have layering issues with [script.js]

Viewed 23

Rocket ship

I you see the code with the fillStyle "yellow", well it is behind the the orange triangle and I need it in front of it, please keep it simple, as I am just a beginner learning out of a book. Thank You, TheFrustratedCoder

  ctx.fillStyle = 'orange'
  ctx.beginPath()
  ctx.moveTo(160, 310)
  ctx.lineTo(200, 370)
  ctx.lineTo(240, 310)
  ctx.fill()
  
  ctx.fillstyle = 'yellow'
  ctx.beginPath()
  ctx.moveTo(180, 310)
  ctx.lineTo(200, 330)
  ctx.lineTo(220, 310)
  ctx.fill()
0 Answers
Related