Relative Content

Tag Archive for javascriptmath

Math help for a simple Chart

I have 5 horizontal lines and each has a distance of 50 px. The first horizontal line should display the max value, the last the min value. Now I have an array with 4 items with different values. Basically I want show the LINES on the horizontal lines to show the chart.

Javascript random numbers

function quastionGet(num1,operator,num2){ let operators = [“/”,”*”,”+”,”-“] num1 = Math.floor(Math.random() * 100 + 1) num2 = Math.floor(Math.random() * 100 + 1) operator = operators.Math.floor(Math.random() * operators.length + 1) return num1 } quastionGet(num1,operator,num2) why i dont get what i want i want to get num1 with random numbers between 1 and 100 I am trying to get […]