crop_rotate
Run
<!DOCTYPE html> <html> <body> <h2>Looping JavaScript Object Values</h2> <p id="demo"></p> <script> const myJSON = '{"name":"Ahmed", "age":30, "car":null}'; const myObj = JSON.parse(myJSON); let text = ""; for (const x in myObj) { text += myObj[x] + ", "; } document.getElementById("demo").innerHTML = text; </script> </body> </html>
Looping JavaScript Object Values