Tailwind CSS: Create a Responsive Navbar with a Search Box

June 25, 2022 Pennywise

This tutorial walks you through a complete example of creating a typical responsive navigation menu bar with logo, links, and a search box inside. We’ll use Tailwind CSS, Font Awesome (to add some icons), and a…

Tailwind CSS: How to Create a Full-Screen Overlay Menu

June 24, 2022 Pennywise

A full-screen overlay menu has a fixed position as well as full-screen width and height. It stays over other elements of the webpage. However, a full-screen overlay menu is hidden by default and only shows up…

Tailwind CSS: Create a Floating Action Button (FAB)

June 24, 2022 Pennywise

A floating action button (FAB) is usually located in the lower right or left corner of the screen. It has a fixed position and has a larger z-index than other elements of the web page. Therefore,…

Javascript: Count the occurrences of each word in a string

June 23, 2022 A Goodman

The example below shows you how to count the occurrences of each word in a given sentence in Javascript. The result will be an object where each key is a word and the value is the…

Javascript: 3 Ways to Calculate the Sum of an Array

June 23, 2022 A Goodman

This practical, succinct article walks you through three examples that use three different approaches to find the sum of all elements of a given array in Javascript (suppose this array only contains numbers). Without any further…

Javascript Object: Find the Key(s) of a given Value

June 23, 2022 A Goodman

This practical, concise article shows you a couple of different ways to get the key if know its value in a Javascript object. Without any further ado, let’s write some code. Caveat: It is possible that…

Javascript: 2 Ways to Find Min/Max Property of an Object

June 23, 2022 A Goodman

This short and straight-to-the-point shows you two different ways to get the minimum and maximum properties of a Javascript object (assuming this object has two or more properties with all values being numeric). The Modern Way…

Javascript: 3 Ways to Find Min/Max Number in an Array

June 23, 2022 A Goodman

This article walks you through a couple of different ways to find the minimum and maximum numbers in a Javascript array. Knowing more than one solution to solve a problem can help you understand Javascript more…

Javascript: How to Reverse an Integer

June 23, 2022 The Plumber

In Javascript, you can reverse a given integer (e.g. turn 123 to 321, -456 to -654, 1200 to 21) by performing the following steps: Convert the integer to a string Reverse that string Turn the reversed…

3 Ways to Reverse a Given String in Javascript

June 22, 2022 The Plumber

The three examples below show you three different approaches to reverse a given string in Javascript. Without any further ado, let’s get started. Using Array.reverse() method The code with explanations: Console output: You can shorten the…

How to Reverse a String in Dart (3 Approaches)

June 22, 2022 A Goodman

The three examples below show you three different ways to reverse a given string in Dart (e.g. turn ABC to CBA). Example 1 Output: Example 2 Output: Example 3 Output: Futher reading: How to Subtract two…

Tailwind CSS: How to Create an Off-Canvas Side Menu

June 20, 2022 Pennywise

An off-canvas menu is a side navigation menu that pushes the content to the right (or left, bottom, top directions) when it shows up (it doesn’t overlap or cover content). A user can open or close…

1 2 3 4 76