-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
26 lines (22 loc) · 696 Bytes
/
main.js
File metadata and controls
26 lines (22 loc) · 696 Bytes
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
function takeValue(value) {
document.getElementById("output-window").value += value;
}
function calculateResult() {
var result = eval(document.getElementById("output-window").value);
document.getElementById("output-window").value = result;
}
function clearValue(value) {
document.getElementById("output-window").value = value;
}
function deleteValue() {
var value = document.getElementById("output-window").value;
document.getElementById("output-window").value = value.substr(
0,
value.length - 1
);
}
function minPlusNum() {
var value = document.getElementById("output-window").value;
value = value * -1;
document.getElementById("output-window").value = value;
}