What you didn’t know about JSON.Stringify

This post shows a couple of new tricks and ways to properly leverage the hidden capabilities of JSON.stringify covering: JSON expectations and non-serializable data formats, How to use toJSON() to define objects properly for JSON serialization, The replacer option for filtering out values dynamically, the spaceparameter for formatting JSON output. The post also covers the difference between stringifying arrays and objects containing non-stringifiable fields

Understanding JavaScript Property Descriptors 2

If this is your first time here, you should read the first post in this series. Then come back to this to continue. Continuing with the dive into property descriptors, this post goes deeply into the properties, what they mean and how they can be used. 1. Modifying existing properties The defineProperty method allows users to create and modify … Continue reading Understanding JavaScript Property Descriptors 2

Learning ES2015 : let, const and var

Lions at the zoo Zoos allow for safely viewing dangerous wild animals like lions. Lions are caged in their enclosures and can't escape its boundaries (if they did, it'd be chaos eh?). Handlers, however, can get into cages and interact with them. Like cages, you can think of variable scoping rules as establishing the boundaries and walls in … Continue reading Learning ES2015 : let, const and var

Chrome dev tools deep dive : Network

1. Throttling A web application might work beautifully on fast networks but stutter and even throw up bugs on slow connections. Fiddler used to be the go-to tool for simulating delays and adding latency during testing; the good news now is that Chrome provides throttling too. There are preset profiles available (e.g. GPRS, 3G, etc.) but … Continue reading Chrome dev tools deep dive : Network