Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

166 - Higher Order Function Challenge Solution.html 356 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  1. <p><br></p><pre class="prettyprint linenums">function add(num1, num2) {
  2. return num1 + num2;
  3. }
  4. function subtract(num1, num2) {
  5. return num1 - num2;
  6. }
  7. function multiply(num1, num2) {
  8. return num1 * num2;
  9. }
  10. function divide(num1, num2) {
  11. return num1 / num2;
  12. }
  13. function calculator(num1, num2, operator) {
  14. return operator(num1, num2);
  15. }</pre>
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...