This code displays all numbers in the array on the left, odd numbers in the middle and the even ones on the right, but the div center does not accept the values. checked over it and debugged for about half an hour and nothing. The code used to input the data for left and right is the same but for center it does not work. when checking through the console center has the values stored just like left and right but it was not able to insert the stored values into the div. Any help would be greatly appreciated.
<style>
#left{
width : 30%;
float: left;
}
#right{
width: 30%;
float: left;
}
#center{
width: 30%;
float: left;
}
</style>
</head>
<body>
<div id = "left"></div>
<div id = "right"></div>
<div id = "center"></div>
<script>
var mya = new Array(50);
var l = document.getElementById("left");
var r = document.getElementById("right");
var c = document.getElementById("center");
var left = '';
var right = '';
var center = '';
for(var c = 0;c<mya.length;c++){
mya[c] = parseInt(Math.random() * 100);
left+="<li>" + mya[c] +"</li>";
if (mya[c]%2){right+="<li>" + mya[c] +"</li>";}
else{center+="<li>" + mya[c] +"</li>";}
}
l.innerHTML+="<ul>" + left + "</ul>";
r.innerHTML+="<ul>" + right + "</ul>";
c.innerHTML+="<ul>" + center + "</ul>";
</script>
</body>
c.inerHTML+="<ul>" + center + "</ul>";?