Published 4/10/2016 · 1 min read
Tags: javascript
JavaScript Objects
In this example we are storing the object’s properties by value. What this means is that cb is stored in memory, when you change the value of box.material to Steel it doesn’t change the value of cb. Both the console.log(cb); will display cardboard as cb has stored the value cardboard in memory.
var box = {};
box.material = "Cardboard";
var cb = box.material;
console.log(cb);
box.material = "Steel";
console.log(cb);
For more Javascript learning check out my CodePen JS collection.
Related Articles
- Testing Svelte 5 Apps: A Practical Guide to Code Structure
How to structure your Svelte code so it's actually testable, with real examples from building a wallet auth system.
- Compressed NFTs: Collections, Verification, and Building a Claim Page
Taking our cNFT minting system to production: creating verified collections, building a web-based claim flow, and preparing for mainnet deployment.
- Building Compressed NFTs on Solana with Generative SVG Art
A practical guide to creating and minting compressed NFTs (cNFTs) on Solana using Metaplex Bubblegum, with animated SVG artwork generated from wallet addresses.