so i have a problem with some seemingly simple code. i am trying to calculate the points on a slope of 1/2. but all I am getting is the empty array object.
const canvas = {
width: 1200,
height: 600
};
const slopeValues = [];
for (let i = canvas.height / 2; i < canvas.height / 2; i--) {
let obj = {};
obj.x = i;
slopeValues.push(obj);
}
console.log(slopeValues)
I should also mention that I do have the original code structured in a test suite(mocha). that shouldn't effect it but I'm not sure as I'm new to TDD.
let i = canvas.height / 2; i < canvas.heightIfiis initialized to be equal tocanvas.height, then it will never be<thancanvas.height.