Function code| MDN


Hi…
Can I have a detailed explanation of line 6 in the first picture, and what is the benefit of the “number” in line 1 in the second picture, what function does it do.

Article link :point_down:

Hello @albaraa_1949

this is what line 6 do

it add arc

and line 1 return a number from 0 till number

Math.random() * number  return float number from 0 till number  (number is not included)

and floor do this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor

and have a nice day :slight_smile: