1answer_Add = 5 + 1; //answer = 6
2answer_Sub = 5 - 1; //answer = 4
3answer_Multi = 5 * 5; //answer = 25
4answer_Divi = 10 / 2; //answer = 5
5Total = answer_Add + answer_Sub + answer_Multi + answer_Divi;
1<!DOCTYPE html>
2<html>
3<body>
4
5<p>Result is.</p>
6
7<p id="demo">0</p>
8
9<script>
10document.getElementById("demo").innerHTML = add(3).mul(5).divide(5);
11function add(num) {
12 return {
13 mul: function(mulNum) {
14 let mulResult = num * mulNum
15 return {
16 divide: function(divNum) {
17 let divResult = mulResult/divNum;
18 return divResult
19 }
20 }
21 }
22 }
23}
24</script>
25
26</body>
27</html>
28