crop_rotate
Run
<!DOCTYPE html> <html> <body> <h2>Looping an Array</h2> <p id="demo"></p> <script> const myJSON = '{"name":"Ahmed", "age":30, "cars":["Ford", "BMW", "Fiat"]}'; const myObj = JSON.parse(myJSON); let text = ""; for (let i in myObj.cars) { text += myObj.cars[i] + ", "; } document.getElementById("demo").innerHTML = text; </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8aDI+TG9vcGluZyBhbiBBcnJheTwvaDI+DQo8cCBpZD0iZGVtbyI+PC9wPg0KDQo8c2NyaXB0Pg0KY29uc3QgbXlKU09OID0gJ3sibmFtZSI6IkFobWVkIiwgImFnZSI6MzAsICJjYXJzIjpbIkZvcmQiLCAiQk1XIiwgIkZpYXQiXX0nOw0KY29uc3QgbXlPYmogPSBKU09OLnBhcnNlKG15SlNPTik7DQoNCmxldCB0ZXh0ID0gIiI7DQpmb3IgKGxldCBpIGluIG15T2JqLmNhcnMpIHsNCiAgdGV4dCArPSBteU9iai5jYXJzW2ldICsgIiwgIjsNCn0NCg0KZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoImRlbW8iKS5pbm5lckhUTUwgPSB0ZXh0Ow0KPC9zY3JpcHQ+DQoNCjwvYm9keT4NCjwvaHRtbD4=