<input type="checkbox" class="checkbox1-btn" onclick="checkbox1()">
<input type="checkbox" class="checkbox2-btn" onclick="checkbox2()">
const price = 200; //default
const checkbox1= 50; //checkbox 1
const checkbox2= 50; //checkbox 2
const checkbox1_btn = document.getElementsByClassName('checkbox1-btn'); // html checkbox element
const checkbox2_btn = document.getElementsByClassName('checkbox2-btn'); // html checkbox element
function checkbox1(){
if (checkbox1_btn.checked == true){
price = price + checkbox1;
}
if (checkbox1_btn.checked == false){
price = price - checkbox1;
}
}
function checkbox2(){
if (checkbox2_btn.checked == true){
price = price + checkbox2;
}
if (checkbox2_btn.checked == false){
price = price - checkbox2;
}
}