// Complete the function
function calculate(n) {
...
};
calculate(48); // 52
calculate(52); // 48
The function accepts one argument.
If 48 is passed then it should return 52,
& if 52 is passed then it should return 48
Write the function body without using loops (for, while..) or conditionals(if..else, ?:, switch)
Thanks for reading π
Follow @codedrops.tech for daily posts.
Instagram β Twitter β Facebook
Micro-Learning β Web Development β Javascript β MERN stack β Javascript
codedrops.tech
Top comments (2)
You need just to...
Solution
Solve the system of 2 linear equations:
And the solution is: a = -1, b = 100. So,
Awesome π₯π