Created
May 22, 2020 15:17
-
-
Save venelrene/143294d4fef9d9c04ce6116a79e995cc to your computer and use it in GitHub Desktop.
This function takes two numbers as parameters, the first number being the coefficient, and the second number being the exponent. Your function should multiply the two numbers, and then subtract 1 from the exponent. Then, it has to print out an expression (like 28x^7). "^1" should not be truncated when exponent = 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function derive(coefficient,exponent) { | |
return `${coefficient*exponent}x^${exponent-1}` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment