Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
parameters

2 Articles
{
,

}
Direct link to the article A Primer on the Different Types of Browser Storage
cache cookies Indexeddb kv storage localStorage parameters

A Primer on the Different Types of Browser Storage

In back-end development, storage is a common part of the job. Application data is stored in databases, files in object storage, transient data in caches… there are seemingly endless possibilities for storing any sort of data. But data storage isn’t …

Ido Shamun on Oct 21, 2020
Direct link to the article Required Parameters for Functions in JavaScript
error handling JavaScript parameters

Required Parameters for Functions in JavaScript

Ooo this is clever! I’m snagging this from David’s blog.

const isRequired = () => { throw new Error('param is required'); };

const hello = (name = isRequired()) => { console.log(`hello ${name}`) };

// These will throw errors
hello();
…
Chris Coyier on Jan 2, 2020

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top