I wish to put my result like this:
But what I get is like this:
And here is my code. What is the correct way?
<script>
var myObj, x= "", y="";
myObj={
"Movie": ["Deadpool", "Xmen", "Hunger Games", "RoboCop", "LOTR", "Starwar"],
"Rating": [ 8, 6, 7, 2, 8, 7 ]
};
document.write("<table border='1'>")
document.write("<tr>")
for (i in myObj.Movie)
{
document.write("<td width='80' >" + myObj.Movie[i] + "</td>");
}
for (i in myObj.Rating)
{
document.write("<td width='80' >" + myObj.Rating[i] + "</td>");
}
document.write("</tr>")
document.write("</table>")
</script>

