-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemory.html
More file actions
29 lines (21 loc) · 730 Bytes
/
memory.html
File metadata and controls
29 lines (21 loc) · 730 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
27
28
$(document).ready(function () {
$(".num").click(function () {
let defaultValue = parseInt($("#fvalue").text());
let TakenValue = parseInt($(this).find("p").text());
let newValue = defaultValue + TakenValue;
$("#screen").find("p").text(newValue);
});
});
// const numClicked = parseInt($("#fvalue").find("p").text());
// function caculate(numClicked) {
// let defaultValue = numClicked;
// let TakenValue = parseInt($(this).find("p").text())
// let newValue = defaultValue + TakenValue;
// return newValue
// }
// $(document).ready(function () {
// $(".num").click(function () {
// let ans = caculate(numClicked)
// $("#fvalue").text(ans);
// });
// });