Build a Type Safe Math Toolkit - Step 1

Tell us what’s happening:

What does it mean to return the square of a number,what number?

Your code so far

/* file: index.ts */

// User Editable Region

const square =  (param)=>{
  return 4 * 4;
}

// User Editable Region

/* file: tsconfig.json */
{
  "compilerOptions": {
    "noCheck": true
  }
}

Your browser information:

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

Challenge Information:

Build a Type Safe Math Toolkit - Step 1

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-type-safe-math-toolkit/699f1d72e906e4616155290d.md at main · freeCodeCamp/freeCodeCamp · GitHub

Hello,

You have hard coded the square of 4. But your function needs to be able to return the square of any number. When you call the square function, you pass in the number you want to square, like this: console.log(square(3)), which should return 9, right? (3 * 3) So your function needs to use the param parameter to return the square.

Happy coding