What are symbols? Symbols are primitive values that are guaranteed to be unique. You can create a new symbol with the Symbol constructor and optionally provide a description string: const foo = Symbol('foo'); Symbols are primitives, not objects. We ...
Introduction It’s common to use the logical OR operator (||) to specify a default value: function createSong(title, artist) { return { title: title || '(Untitled)', artist: artist || '(Unknown)', } } ES2020 adds the nullish c...
Introduction You’ve probably come across template literals when writing JavaScript: function sayHi(name) { console.log(`Hi, ${name}!`); } sayHi("Zach"); // "Hi, Zach!" Template literals are handy for their ability to interpolate values and crea...
Introduction Take a look at the following code and guess what happens when the Main method gets invoked: public class Program { public static async Task Main() { var result = await AsyncFoo(); result = await NonAsyncFoo(); ...
A quick look at positioning elements in CSS.
Introduction This is a post in a series about topics covered in Josh Comeau's CSS for JavaScript Developers course. These posts will be brief, polished versions of my notes, and I'll write about new things I learned or deepen my understanding of some...