Blog

Page 878 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for JavaScript check if variable exists (is defined/initialized)
functioninitializationjavascriptundefinedvariables

JavaScript check if variable exists (is defined/initialized)

Published on August 15, 2021

šŸ‘‹šŸ‘‹ Hey there, tech enthusiasts! Today we're diving into the world of JavaScript and tackling a common question that often pops up in our coding adventures: how can we check if a variable exists and is initialized in JavaScript? šŸ¤”šŸ’» Imagine this scenari

Cover Image for How can I guarantee that my enums definition doesn"t change in JavaScript?
javascript

How can I guarantee that my enums definition doesn"t change in JavaScript?

Published on August 14, 2021

# Title: 🌈 How to Create Immutable Enums in JavaScript šŸš€ Have you ever found yourself needing to use enums in JavaScript, only to realize that they are not built-in like in some other programming languages? šŸ˜• Fear not, because in this blog post, we wil

Cover Image for $(document).ready equivalent without jQuery
javascriptjquerypageload

$(document).ready equivalent without jQuery

Published on August 13, 2021

## Title: Lighten Up Your Script: A jQuery-free Solution to $(document).ready šŸ“ Hey there tech enthusiasts! Are you tired of unnecessary dependencies weighing down your script? šŸ’Ŗ If you're using jQuery solely for its $(document).ready functionality and

Cover Image for How to get the children of the $(this) selector?
javascriptjqueryjquery-selectors

How to get the children of the $(this) selector?

Published on August 12, 2021

# How to Get the Children of the $(this) Selector? šŸ¤” Hey there, tech enthusiasts! šŸ‘‹ Are you having trouble selecting the child `img` inside a `div` when using the `$(this)` selector? Don't worry, you're not alone! In this blog post, we'll address this c

Cover Image for JavaScript equivalent to printf/String.Format
javascriptprintfstring.format

JavaScript equivalent to printf/String.Format

Published on August 11, 2021

🌟 JavaScript Equivalent to printf/String.Format: A Handy Guide! šŸŽÆ Are you a C/PHP or C#/Java programmer in search of a JavaScript equivalent to the mighty `printf()` or `String.Format()` functions? Look no further! šŸ’Ŗ In this blog post, we'll explore th

Cover Image for Get the size of the screen, current web page and browser window
cross-browserhtmljavascriptjquerylayout

Get the size of the screen, current web page and browser window

Published on August 10, 2021

# Getting the Size of the Screen, Current Web Page, and Browser Window šŸ–„ļøšŸ“ Are you looking to retrieve information about the size of the screen, current web page, or browser window? You've come to the right place! In this blog post, we will explore a co

Cover Image for What is JSONP, and why was it created?
javascriptjsonjsonpterminology

What is JSONP, and why was it created?

Published on August 9, 2021

# Blog Post: What is JSONP and Why was it Created? šŸ¤” Have you ever heard of JSONP but couldn't quite understand what it is or why it exists? Don't worry, you're not alone! JSONP can be a confusing concept, especially if you're familiar with JSON but not

Cover Image for How to format numbers as currency strings
currencyformattingjavascript

How to format numbers as currency strings

Published on August 8, 2021

šŸ’°šŸ’µšŸ’ø How to Format Numbers as Currency Strings šŸ’°šŸ’µšŸ’ø So you're looking to format a number as a currency string in JavaScript, huh? šŸ’»šŸ’­šŸ’” Formatting numbers as currency strings can be quite useful when dealing with financial applications, e-commerce pl

Cover Image for Generate random number between two numbers in JavaScript
javascriptrandom

Generate random number between two numbers in JavaScript

Published on August 7, 2021

# Generating Random Numbers between Two Numbers in JavaScript šŸ”¢ Are you looking for a way to generate a random number within a specified range using JavaScript? Look no further! In this blog post, we'll dive into the common issue of generating random num

Blog | Matheus Mello