Skip to main content
100%

Js Basics

✓ Published1🌍 Public
PPrince Kumar
Last edited Mar 17, 2024
Created on Mar 17, 2024
Forked from SVG Fundamentals

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 description

A demonstration of SVG shapes.

MIT Licensed

Similar vizzes