Working with Touch Events in JavaScript

Touch events are essential when developing for mobile devices such as smartphones and tablets. They enable you to handle user interactions with your web page through touch gestures. In this article, we will explore the basics of working with touch events in JavaScript. The Four Touch Events JavaScript provides four touch events that you can use to track user interactions: touchstart: Triggered when a touch event starts, meaning the user touches the screen....

Working with Unicode in JavaScript: A Comprehensive Guide

In this article, we will explore how to effectively work with Unicode in JavaScript. We will cover topics such as Unicode encoding of source files, how JavaScript uses Unicode internally, using Unicode characters in a string, normalization, emojis, getting the proper length of a string, ES6 Unicode code point escapes, and encoding ASCII characters. Unicode Encoding of Source Files When working with JavaScript, it’s important to specify the Unicode encoding of your source files, especially if you plan to use non-ASCII characters....

Write what you don't know: Exploring the power of learning through writing

As the day winds down, I find myself engrossed in Tim Ferris’ book, “Tools of Titans.” This captivating collection offers insights, quotes, and invaluable advice from exceptionally successful individuals. The pages are filled with practical guidance, inspiring anecdotes, and wisdom worth absorbing. Amidst my reading, I stumble upon a thought-provoking quote: “What’s the worst advice you hear often? ‘Write what you know.’ Why would I want to write about what little I know?...

Writing About Different Topics: A Reflection on Blogging

As a seasoned blogger, I have covered a wide range of topics throughout my writing journey. Starting with random Web Development subjects, I delved into Go, React, Node.js, CSS, HTML, Browser APIs, Next.js, Vue.js, Svelte, databases, Python, Swift, and even electronics and C. Sometimes, I find myself wanting to explore new topics beyond my usual focus, which is Web Development. After all, my blog is not confined to a single niche like “Web Development....

Writing Files with Node.js

Learn how to write files using Node.js and make use of the fs.writeFile() API for an easy and efficient approach. Example: Here is an example of how to write a file using the fs.writeFile() API: const fs = require('fs') const content = 'Some content!' fs.writeFile('/Users/flavio/test.txt', content, (err) => { if (err) { console.error(err) return } //file written successfully }) Alternatively, you can use the synchronous version fs.writeFileSync(): const fs = require('fs') const content = 'Some content!...

Writing JavaScript loops using map, filter, reduce, and find

Learn how to perform common operations in JavaScript using map(), filter(), reduce(), and find() instead of using loops. Loops are commonly used in programming languages to perform operations on arrays. You can iterate over the elements of an array and perform calculations or operations on them. In this blog post, we’ll explore alternative approaches to using loops by leveraging functional programming concepts. We’ll specifically look at four powerful array functions: map(), filter(), reduce(), and find()....

XMLHttpRequest (XHR)

The introduction of XMLHttpRequest (XHR) in browsers in the mid-2000s was a significant milestone for the Web Platform. In this article, we will explore how XHR works, its capabilities, and compare it with other popular alternatives. Introduction Back in the day, technologies like GMail and Google Maps seemed revolutionary. These applications heavily relied on XHR to deliver dynamic content. XMLHttpRequest was initially invented by Microsoft in the 1990s and became a de-facto standard as all major browsers implemented it between 2002 and 2006....

Zeit Now Tutorial - A Fast and Simple Way to Deploy Node.js Apps

Learn how to deploy your Node.js application using the Now platform created by Vercel (formerly known as Zeit). One of the easiest ways to deploy a Node.js application is through the Now platform created by Vercel. Now makes the deployment process fast and simple, acting as a cloud service that provides you with a URL to access your deployed application. With Now, you can easily deploy Node.js apps, static websites, and more....