var student = { name: "John Doe", marks : 400, subject : { sub1 : "maths", sub2 : "english" } } console.log("Student studies" + student.subject.sub1 + " and " + student.subject.sub2);
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter