Var jsonarr=[{name: "let the king", the age: 20}, {name: "as a 1", the age: 15}, {name: "the king of 45", the age: 20}].
The console. The log (jsonarr [0]. Name);
The console. The log (jsonarr [0]. Age);
Var zhi=` & lt; Table>
`
For (var v of jsonarr)
{
Zhi +=` & lt; Tr>
The ${v.n ame}
The ${says v. ge}
`;
}
Zhi="& lt;/table> ";
Document. The write (zhi);
</script>
CodePudding user response:
zhi + ="& lt;/table> ";