-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom.js
45 lines (35 loc) · 1.47 KB
/
custom.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function plus(num1 , num2) {
document.getElementById("myList").innerHTML = "";
var node = document.createElement("LI");
var textnode = document.createTextNode(`Sum = ${num1+num2}`);
node.appendChild(textnode);
document.getElementById("myList").appendChild(node);
}
function modulus(num1 , num2) {
document.getElementById("myList").innerHTML = "";
var node = document.createElement("LI");
var textnode = document.createTextNode(`Sum = ${num1%num2}`);
node.appendChild(textnode);
document.getElementById("myList").appendChild(node);
}
function minus(num1 , num2) {
document.getElementById("myList").innerHTML = "";
var node = document.createElement("LI");
var textnode = document.createTextNode(`Sum = ${num1-num2}`);
node.appendChild(textnode);
document.getElementById("myList").appendChild(node);
}
function multiplication(num1 , num2) {
document.getElementById("myList").innerHTML = "";
var node = document.createElement("LI");
var textnode = document.createTextNode(`Sum = ${num1*num2}`);
node.appendChild(textnode);
document.getElementById("myList").appendChild(node);
}
function division(num1 , num2) {
document.getElementById("myList").innerHTML = "";
var node = document.createElement("LI");
var textnode = document.createTextNode(`Sum = ${num1/num2}`);
node.appendChild(textnode);
document.getElementById("myList").appendChild(node);
}