Skip to content

Files

Latest commit

6cc6ddd · Jul 19, 2023

History

History
20 lines (16 loc) · 860 Bytes

File metadata and controls

20 lines (16 loc) · 860 Bytes

Tasks 🎯

  • You have the line below in the main file, main.js, which is a function that accepts three values and adds them together.
  • Create the mod-one.js file containing this function with three parameters.
  • The function should be anonymous, and make the necessary changes in the file to be able to use it in the main.js file.
  • Create the mod-two.js file.
  • Copy the three variables provided below into it without making any modifications to them.
  • Write whatever you want in the mod-two.js file to make the code in the main.js file work correctly.

Code 💻

// main.js File
console.log(calc(modOne.numOne, modOne.numTwo, modOne.numThree)); // 60

// mod-two.js File
let a = 10; // Do Not Edit Names
let b = 20; // Do Not Edit Names
let c = 30; // Do Not Edit Names