Js Basics
This example demonstrates basic JavaScript syntax and concepts through a series of commented-out code snippets, culminating in an active arrow function that creates a person object and logs it to the console. The page contains an empty SVG element with a 960 by 500 pixel canvas, though no visual output is rendered. The code explores variable declaration, arithmetic operations, object creation, and function definitions, contrasting traditional function expressions with ES6 arrow functions and shorthand property syntax. The active example defines a `person` function that returns an object with `first` and `last` properties, then invokes it with the arguments 'Jane' and 'Doe' to log `{first: "Jane", last: "Doe"}` to the browser console. The rendering approach is purely HTML with inline SVG and JavaScript, requiring no external libraries.
AI-generated descriptionA demonstration of SVG shapes.