New to Javascript Need to make a calculator by applying HTML CSS and Javascript. With all the buttons placed need to make a calculator app like this by calling the onclick function on each of the button wtih arguments passed into it. Please help to get started with it.
Calculator Current Design:

Here is the HTML and CSS Code:
body {
font-family: 'Open Sans', sans-serif;
background-color: black;
}
#container {
width: 1000px;
height: 550px;
background-image: linear-gradient(#0000004d, rgba(0, 0, 0, 0.3)),
url(bgcalc.png);
margin: 20px auto;
}
#calculator {
width: 320px;
height: 520px;
background-color: #eaedef;
margin: 0 auto;
top: 20px;
position: relative;
border-radius: 5px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
#result {
height: 120px;
margin-bottom: 20px;
}
#history {
text-align: right;
height: 20px;
margin: 0 20px;
padding-top: 20px;
font-size: 15px;
color: #919191;
}
#output {
text-align: right;
height: 60px;
margin: 10px 20px;
font-size: 30px;
background-color: #afbec4;
}
#keyboard {
height: 400px;
}
.operator,
.number,
.empty {
width: 67px;
height: 50px;
margin: 6px;
float: left;
border-width: 0;
font-weight: bold;
font-size: 15px;
}
#clear {
background-color: #cb4e4d;
border-radius: 45%;
}
.number,
.empty {
background-color: #5f7d8c;
border-radius: 10px;
color: white;
}
.number,
.operator {
cursor: pointer;
background-color: #5f7d8c;
border-radius: 10px;
color: white;
}
.operator:active,
.number:active {
font-size: 13px;
}
.operator:focus,
.number:focus,
.empty:focus {
outline: 0;
}
button:nth-child(4) {
font-size: 9px;
background-color: #cb4e4d;
border-radius: 10px;
}
button:nth-child(8) {
font-size: 20px;
background-color: #ffa500;
border-radius: 10px;
}
button:nth-child(12) {
font-size: 20px;
background-color: #f08080;
border-radius: 10px;
}
button:nth-child(16) {
font-size: 20px;
background-color: #7d93e0;
border-radius: 10px;
}
button:nth-child(20) {
font-size: 20px;
background-color: #9477af;
border-radius: 10px;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:600,700" rel="stylesheet">
<title>A simple calculator</title>
</head>
<body>
<div id="container">
<div id="calculator">
<div id="result">
<div id="history">
<p id="history-value"></p>
</div>
<div id="output">
<p id="output-value"></p>
</div>
</div>
<div id="keyboard">
<button class="operator" id="clear">C</button>
<button class="operator" id="backspace">+-</button>
<button class="operator" id="%">%</button>
<button class="operator" id="/">Console <br>Log</button>
<button class="number" id="7">7</button>
<button class="number" id="8">8</button>
<button class="number" id="9">9</button>
<button class="operator" id="*">÷</button>
<button class="number" id="4">4</button>
<button class="number" id="5">5</button>
<button class="number" id="6">6</button>
<button class="operator" id="-">×</button>
<button class="number" id="1">1</button>
<button class="number" id="2">2</button>
<button class="number" id="3">3</button>
<button class="operator" id="+">-</button>
<button class="empty" id="empty">0</button>
<button class="number" id="0">.</button>
<button class="empty" id="empty">=</button>
<button class="operator" id="=">+</button>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>