This week, I’ve been digging into a lot more ES6 tips and tricks to help clean up some of my code. As I spoke about in the second part of my “How I learned :code, through: :music_teaching” series, one of the most important things you can do in your code is to go back and refactor things to look simpler and easier to read.

In ES6 we are introduced to a new way to create and store objects called Object Property Shorthand. To understand how this works, let’s recall what initializing an object in ES5 looks like:

let name = "Kevin"
let job = "Dev"
let address = "You Wish 😏"

const developers = {
name: name,
job: job,
address: address
}

#es6 #javascript-tips #javascript #objects #tips-and-tricks

ES6 Object Property Shorthand- Make Those Objects Look Cleaner
1.10 GEEK