Assessment Request for Functions 1 Skill Test

Hi. Any assessment would be appreciated. :cat:

Functions 1
Functions 2
Functions 3

In Functions 2 I was able to make random(min, max) function with two parameters either of which could be included in the return value, but I couldn’t make it with both excluded, which I think has been asked to students to do.

Is it possible to make the function with both numbers excluded in the range?

As always, thank you very much and have a great day!

Hey man,

I had a quick look over your code man. The first and last one’s works like a charm,

I would take a look again over the second one, this is what I wrote for you:

function draw(){
  ctx.beginPath();//This Instructs the canvas to start making a shape
  ctx.rect(x,y,width,height);//This calls in the variables above or from the global scope
  ctx.fillStyle = color;//Sets the fill color of the rectangle
  ctx.fill();//Instructs to fill shape
  ctx.closePath();//Finishes the drawing of the Shape
}
draw();
2 Likes