Nicolas Mesa

Dad, husband, geek

How to Access Logged Objects in the Javascript Console

In this short post, we go through the process of making a console.logged Object available in Chrome’s javascript console. TLDR Right-click the Object you want to inspect and click Store as global variable. This creates a variable with name temp<n> where <n> is a number (starts from 1). Use the variable to access the Object. Explanation The Hack Version Sometimes when I’m debugging, I need to access an Object and its methods from the Javascript console. Read more →

Var vs Let vs Const

Hi there! In this post, we’re going to talk about javascript. We’ll start by looking at some examples of var, let and const variable declarations and their properties. Then we’re going to go through my recommendations of when to use each one. var var is the original way to do variable declaration in javascript. Here’s an example of how you can declare a variable using var: var myVariable = 10; var is function-scoped Variables defined using var are function scoped. Read more →