Test your skills math/ math 1 my answer

Hi, this is my solution. :smiley:
let finalResult;

let evenOddResult;

// Add your code here
num1 = 4;
num2 = 8;
num3 = 2;
num4 = 6;

res1 = num1 + num2;
res2 = num4 - num3;

finalResult = res1 * res2;
evenOddResult = finalResult % 48;

// Don’t edit the code below here!

section.innerHTML = ’ ';
const para1 = document.createElement(‘p’);
const finalResultCheck = finalResult === 48 ? Yes, well done! : No, it is ${ finalResult };
para1.textContent = Is the finalResult 48? ${ finalResultCheck };
const para2 = document.createElement(‘p’);
const evenOddResultCheck = evenOddResult === 0 ? ‘The final result is even!’ : ‘The final result is odd. Hrm.’;
para2.textContent = evenOddResultCheck;


Hi @Maurycy_Gorski and welcome to the community :wave:

I missed your excercises because you posted in the wrong category. I moved them over to the MDN category. Also, it’s fine to make one topic for tasks that belong together. :slightly_smiling_face:

Congratulations! You solved all three task correctly.

If you plan on doing more tasks it would be helpful if you could share your code in an online editor like https://codepen.io/, https://glitch.com or https://jsfiddle.net/. It’s much easier for us if we can see the result and test things out if necessary. Also the forum removes and changes certain code automatically. Thank you :blush:

Have a nice day,