Web development

How to Replace All String Occurrences in JavaScript (in 3 Ways)

When dealing with strings in JavaScript, it’s common for you to need to replace specific characters or substrings with other values. This guide shows you three ways to replace all string occurrences in JavaScript. Also, you learn why some approaches can be better than others. Here’s a quick look at the three approaches you are […]

How to Replace All String Occurrences in JavaScript (in 3 Ways) Read More »

JavaScript String Methods—A Complete Guide (Updated 2023)

String is one of the fundamental data types of JavaScript. Every application has to do some string processing at some point. String handling usually involves finding length, checking if a character exists, splitting the string based on a separator, and so on. These operations are so common, that JavaScript includes ready-made logic for carrying out

JavaScript String Methods—A Complete Guide (Updated 2023) Read More »

What Is “javascript:void(0)”—A Complete Guide (Examples)

You may have encountered javascript:void(0) in an HTML document as a href attribute like this: A common reason why developers use javascript:void(0) trick is to prevent the page from reloading when clicking a link. This comprehensive guide teaches you: Speaking of examples, I think the best way to learn what javascript:void(0) does is by taking

What Is “javascript:void(0)”—A Complete Guide (Examples) Read More »

How to Get Current URL in JavaScript [with Useful Examples]

To get the current URL of the page you are visiting using JavaScript, access the window.location.href property: Alternatively, you can access the current URL via document.URL property. However, it has some shortcomings that I’ll explain in a bit. Let’s take a closer look at the window.location object. It has useful properties other than the href

How to Get Current URL in JavaScript [with Useful Examples] Read More »

9 Best Graphic Design Courses + Certification (in 2023)

Do you want to become a versatile and skilled graphic designer? This is a comprehensive article on the best graphic design certification courses. These courses prepare you for a career as a graphic designer. These courses prepare you for a career as a graphic designer. Most of the courses in the list are individual zero-to-hero

9 Best Graphic Design Courses + Certification (in 2023) Read More »