JavaScript (JS)

page under construction


These are written in the javascript language and will go in the code box where questions start js_function_js (something like that)...

commonly used

math.random and math.floor\ceiling, math.pow, math.round

link to most commonly used of function library for JS (note different if question written in c)

Math.ceil(pass round in here): rounds up to integer

Math.floor(pass here round down)
Force round down

Math.round (##)
Rounds to nearest integer in general

Conditional check: (do while loop)

math.pow(x, y) where x base, y power.

Think from inside to outside—from inner parenthesis to outer parenthesis. In order to pass items

{} segment code
() order of operations, part of the function

Line up parenthesis, as to why they lineup with.

Function library is our coding shortcut of recipes. (needs vetting)

How do I create a random number generator?