How can I set the second "& bonus2" paramenter as optional?
I want if if it turns out the ways: (bonus1 & bonus2 == true) or (bonus1 == true)
function offersFixed(bonus1, bonus2, textValue ){
if (bonus1 && bonus2 == true ){
var valide = document.getElementById("valideorNot");
valide.setAttribute("class", "invalidPass")
valide.textContent = "Oferta Inválida";
var textId = document.getElementById("validateResult");
var createText = document.createElement("h3");
createText.textContent = textValue;
textId.appendChild(createText);
}
}