Failing to add objects to an empty array in javascript [closed]

So I have an empty array and I want to add objects with values determined on runtime. I came up with this code:

var res = []; //the result array which needs to be populated
var rn = Math.random() * 5;
var value1 = rn * 75,
  value2 = rn * 27.91;
let galf = {
  type: rn;
  v1l: Math.floor(value1 / 7);
  v2r: value2 % 7;
}
res.push(galf);
console.log(res)

Now it appears that my declaration of the galf object is erratic. If I comment out this declaration, then the code runs fine.

How do I properly add objects to the array when values of the object are to be determined at runtime?

Answer

You shouldnt use ; in an object, to add more fields you need to use the , to seperate fields

var res = []; //the result array which needs to be populated
var rn = Math.random() * 5;
var value1 = rn * 75,
  value2 = rn * 27.91;

let galf = {
  type: rn,
  v1l: Math.floor(value1 / 7),
  v2r: value2 % 7,
}

res.push(galf);

console.log(res)