Learn Functional Programming by Building a Spreadsheet - Step 102

Tell us what’s happening:

It is saying to have a random function and I am using the random function,
Also can someone say tha whether the formula is going right to satisfy the condition

Math.random()*((nums[0]+nums[1]-nums[0])+nums[0]

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

const spreadsheetFunctions = {
  sum,
  average,
  median,
  even: nums => nums.filter(isEven),
  someeven: nums => nums.some(isEven),
  everyeven: nums => nums.every(isEven),
  firsttwo: nums => nums.slice(0, 2),
  lasttwo: nums => nums.slice(-2),
  has2: nums => nums.includes(2),
  increment: nums => nums.map(num => num + 1),
  random: nums=Math.floor(Math.random()*(nums[0]+nums[1]-nums[0])+nums[0])
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Functional Programming by Building a Spreadsheet - Step 102

You don’t have the correct arrow syntax (as compared with the other properties in spreadsheetFunctions).

this is equal to Math.random() * nums[1], it is not the correct formula to get a value in the range

also the issue with the arrow syntax already mentioned