Why they switched, how they migrated—and why they wouldn’t do it today

Image for post
Image for post
Photo by Jordi Fernandez on Unsplash

The Day the London Servers Baked


Would you pay for the new Stackbit service? Do you like to use themes from sites like Jamstack Themes in your projects, or do you always start from scratch? Is it better to always build your own design library? When is paying for convenience worth it?

Image for post
Image for post
Screenshot of Stackbit by Dr. Derek Austin 🥳 | This post contains no affiliate links.


ES6 introduced let and const as alternatives to var for declaring variables in JavaScript. Because const is not hoisted to the top of the execution context in the same way var is, const should be faster, right?

Image for post
Image for post
Photo by Mg Cthu on Unsplash | There are no affiliate links in this article.

Execution context and hoisting


You can access object properties in JavaScript in one of two ways: . dot syntax or [] bracket notation. Here’s why there are two property accessors and what the difference is between them.

Image for post
Image for post
Photo by Alejandro Barba on Unsplash


You use curly brackets {} to declare objects in JavaScript. Writing out a new object this way is called creating an object literal, which means curly braces {} are the object literal syntax.

Image for post
Image for post
Photo by Cristina Gottardi on Unsplash


JavaScript objects have some interesting rules about what will and won’t work as an object key. Here’s the lowdown on object properties with spaces.

Image for post
Image for post
“Lost Angeles”: Valid JS object key? Or not? (Photo by JOSHUA COLEMAN on Unsplash)


#6 — Customize your portfolio to the industry

Image for post
Image for post
Photo by Magnet.me on Unsplash

1. Add a project to your portfolio


An empty JavaScript object {} seems self-obvious: there are no user-defined object properties (also called object keys). But how exactly do you check if an object is empty in JavaScript?

Image for post
Image for post
Photo by DaYsO on Unsplash

Do Empty Objects {} Have Length 0?

  1. Check the .length of an Array of Object.keys()
  2. Check the .length of Object.getOwnPropertyNames()
  3. Use a for...in loop with .hasOwnProperty()
  4. Check if an Object is Empty of Symbols as Keys


Here’s how to store a JavaScript object in localStorage inside a user’s web browser. Local storage is also known as HTML5 localStorage, window.localStorage, or the browser’s cache.

Image for post
Image for post
Photo by palesa on Unsplash

What is localStorage in JavaScript?


To remove an object key from a JavaScript object, you can’t use the assignment operator (=). Instead, you need to learn the rules for the delete keyword, which removes object keys.

Image for post
Image for post
Photo by u j e s h on Unsplash

Use delete to Remove Object Keys

About

Dr. Derek Austin 🥳

🤓 The physical therapist who writes JavaScript 💪 Web Developer 😎 Mentor 🧠 DPT 😄 SEO Expert 😁 React 😆 Jamstack 💬 Ask me anything 👉 DoctorDerek.com 👈

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store