Add value to html in javascript function

I have a code like this <label>Brand</label></br> <select name=”brand” id=”brand” onChange=”changecat(this.value);”> <option value=”” selected>Select Brand</option> <option value=”A”>AMD</option> <option value=”B”>Intel</option> </select> </br> </br> <label>Socket</label></br> <select name=”category” id=”category” onchange=”showProcessor()”> <option value=”” disabled selected>Select Socket</option> </select> var brandByCategory = { A: [“AM4”, “AM3”, “AM2”], B: [“LGA 1151”, “LGA 1151v2”, “LGA 1150”] } function changecat(value) { if (value.length ==…