assignment 2 is confusing
StrayLove (5)

it says here
// In this exercise, you will be given two variables, they will be called: num1 and num2
// On the next line create a variable called 'difference' and using math operators return num2 subrtracted from num1
const difference = num1 - num2;
do_math(num1, num2);
// Please write your answer in the line above.
return difference;
i am just not getting this whole excercise. tbh the video wasnt explaining that much either. im feeling awful confused

You are viewing a single comment. View All
vedprad1 (859)

First of all you are missing the start of the function, with the name and the parameters. You can't do anything without that.
Second of all, if you have a do_math() function, you do not need it. If you don't have it, you can;t use it. Delete that line.

Your final answer should look like this:

function exerciseTwo(num1, num2) {
  var difference = num1 - num2;
  return difference;

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

I don't know how your teacher grades your answers, but wouldn't it be simpler if you did this?

function exerciseTwo(num1, num2) {
  return num1 - num2;