Search
JavaScript Detect Async Function
29.4.2019
JavaScript async/await has changed the landscape of how we code. We’re no longer stuck in callback or then hell, and our code can feel more “top down” again. Async functions require the following syntax: async function myFunction() { } To use await with a function, the function...
That Time I Tried Browsing the Web Without CSS
24.4.2019
CSS is what gives every website its design. Websites sure aren’t very fun and friendly without it! I’ve read about somebody going a week without JavaScript and how the experience resulted in websites that were faster, though certain aspects of them would not function as expected.
But CSS. Turning...
Convert Video to Grayscale
24.4.2019
I’m a JavaScript fanatic but I’ve always been fascinated with media manipulation. Maybe it’s because I’ve secretly always wanted to be a designer, but I’m fine with being able to manipulate art with software instead of create the art myself. One type of art I’ve...
Netlify Functions for Sending Emails
23.4.2019
Let's say you're rocking a JAMstack-style site (no server-side languages in use), but you want to do something rather dynamic like send an email. Not a problem! That's the whole point of JAMstack. It's not just static hosting. It's that plus doing anything else you wanna do through JavaScript...
Could Grouping HTML Classes Make Them More Readable?
22.4.2019
You can have multiple classes on an HTML element:
<div class="module p-2"></div>
Nothing incorrect or invalid there at all. It has two classes. In CSS, both of these will apply:
.module { }
.p-2 { }
const div...
Tabs: It’s Complicated™
19.4.2019
I've said before one quick and powerful thing you can learn as a front-end developer just getting starting with JavaScript is changing classes.
const button = document.querySelector(".my-button");
const element = document.querySelector(".content");
button.addEventListener("click", function()...
10 Interesting JavaScript and CSS Libraries for April 2019
18.4.2019
Our web dev resources collection for April is filled with amazing open-source projects, useful CSS tools and React components
Clever code
17.4.2019
This week, Chris Ferdinandi examined a clever JavaScript snippet, one that's written creatively with new syntax features, but is perhaps less readable and performant. It's a quick read, but his callout of our industry's fixation on cleverness is worth... calling out:
...we’ve become obsessed as...
Wrap a Vanilla JavaScript Package for Use in React
17.4.2019
Complex web projects often require the use of 3rd party widgets. But what if you're using a framework while a widget is only available in pure JavaScript?
To use a JavaScript w
7 Useful JavaScript Tricks
16.4.2019
Just like every other programming language, JavaScript has dozens of tricks to accomplish both easy and difficult tasks. Some tricks are widely known while others are enough to blow your mind. Let’s have a look at {x} JavaScript tricks you can start using today! Get Unique Values of an Array...
Edge Goes Chromium: What Does it Mean for Front-End Developers?
11.4.2019
In December 2018, Microsoft announced that Edge would adopt Chromium, the open source project that powers Google Chrome. Many within the industry reacted with sadness at the loss of browser diversity. Personally, I was jubilant. An official release date has yet to be announced, but it will be...
Get a CSS Custom Property Value with JavaScript
11.4.2019
Here’s a neat trick from Andy Bell where he uses CSS Custom Properties to check if a particular CSS feature is supported by using JavaScript.
Basically, he's using the ability CSS has to check for browser support on a particular property, setting a custom property that returns a value of either...
In Defense of the Ternary Statement
10.4.2019
Some months ago I was on Hacker News (as one does) and I ran across a (now deleted) article about not using if statements. If you’re new to this idea (like I was), you’re in a for a real treat. Just search for "if statements" on Hacker News. You'll get articles proposing that you might not need...
Undefined: The Third Boolean Value
5.4.2019
I wanted to implement a notification message in one of my projects, similar to what you’d see in Google Docs while a document is saving. In other words, a message shows up indicating that the document is saving every time a change is made. Then, once the changes are saved, the message becomes: “All...
The Ultimate Guide to JavaScript Algorithms: Range Sum
5.4.2019
Sometimes, while performing mathematical calculations, there comes the need to sum up a range of numbers. Some programming languages make this easy by implementing helper functions that enable one
Collective #505
4.4.2019
CSSBattle * Yet Another JavaScript Framework * x-ray * A progressive disclosure component * Gimli
Collective #505 was written by Pedro Botelho and published on Codrops
Používáme knihovnu Readability na serveru
4.4.2019
Možná znáte Readability z reader-view v prohlížeči. Odstraní ze stránky přebytečný balast a zůstane jen dobře čitelný text. Stejný projekt lze s úspěchem použít i na serveru. Pojďme si ukázat, proč i servery potřebují dobře čitelné texty
Responsible JavaScript
3.4.2019
We just made a note about this article by Jeremy Wagner in our newsletter but it’s so good that I think it’s worth linking to again as Jeremy writes about how our obsession with JavaScript can lead to accessibility and performance issues:
What we tend to forget is that the environment websites...
React Starter: React Prerequisites and 4 ES6 Things to Know
2.4.2019
JavaScript has come a long way in the past decade, especially with the ES6 update.
JavaScript’s standardized name is ECMA Script and this version came in 2015. It was named ES2015 o
KV Storage
1.4.2019
localStorage is...
Good! It's an incredibly easy API to use.
localStorage.setItem('name', 'Chris'); let name = localStorage.getItem('name');
Bad! Philip Walton explains why:
localStorage is a synchronous API that blocks the main thread, and any time you access it you potentially prevent your...