Working with sets in JavaScript allows us to manage collections of unique values effortlessly. But what if we want to combine or merge these sets? in this tutorial, we will see how to merge sets using javascript Important Note: Sets Contain Unique Values Only It's essential to note that sets in JavaScript store unique values. If there are … [Continue reading...]
How to Sort a Map in JavaScript
Maps, introduced in ES6, are versatile data structures that store key-value pairs. Sorting a Map in JavaScript can be quite useful when you need your data in a particular order. Let's dive into this together and explore how to sort a map in JavaScript in this tutorial using a step-by-step approach. We will be exploring two methods in this … [Continue reading...]
How to Filter a Map in JavaScript
Maps are powerful data structures in JavaScript, storing key value pairs. But sometimes, we need to extract specific information from this wealth of data. That's where filtering comes in, allowing us to focus on the key-value pairs that meet our criteria. in this tutorial, we will see how to filter a map in javascript Here, we'll explore two … [Continue reading...]
Function is not defined JavaScript onClick
If you're new to JavaScript and see the "Function is not defined" message while using the onclick event in JavaScript, don’t worry—it’s common and fixable! This error pops up when trying to use a function that either doesn't exist or can't be found where it is needed. Understanding the Problem Let's break it down: when you click a … [Continue reading...]
What does colon do in JavaScript & TypeScript?
In JavaScript, the colon (:) serves multiple purposes across different contexts, primarily as a separator and a syntax element within the language. Let's dive into its key roles: Here's a list of the functionalities that a simple colon {:} provides us: 1. Using Colon in the Object Literal Syntax 2. Using Colon in the Ternary … [Continue reading...]
Sorting a Set in JavaScript: A Simple Guide
Sorting a Set in JavaScript involves a few steps but follows a different approach compared to arrays. Sets don’t have a built-in sort() method like arrays, but we can convert them to arrays, sort the arrays, and then convert them back to Sets. Method 1: Creating an Array from Set Elements Step 1: Creating and Populating a Set Create … [Continue reading...]
How to detect browser back and forward button clicks in Javascript?
Generally, we navigate to different pages of a website by clicking the provided buttons on the web page. But, sometimes there is no back button provided on the web pages. In that case, we use the browser back and forward buttons to navigate through the different pages of the website. In this tutorial, we are going to learn about the different ways … [Continue reading...]
Parse Float with 2 decimals in javascript
In this tutorial, we will more about how to parse the float with 2 decimals in JavaScript. Parse Float with 2 Decimals in JavaScript To parse float with 2 decimal places: let us see parse float with 2 decimals by example. First, assign a value that holds the floating point number which we want to parse. Then use … [Continue reading...]
Best Next JS courses to learn Next JS in 2023
There are many great courses available for learning Next.js, here in the Best Next JS courses we will recommend a few courses that are particularly well suited for beginners and intermediate & advanced learners who are looking to learn Next.js. We will see a list of tutorials from udemy, educative.io, Pluralsight, etc. Also, we will keep and … [Continue reading...]
How to redirect to another page in next js
In this tutorial, we will see how to redirect to another page in next js, there are three ways to redirect one page to another page in nextjs. Let's see each option in a detailed way. Using Link Component in Next.JS Using Link component in nextjs it is like a href tag you can just use the href attribute and mention the redirect URL, … [Continue reading...]
How to get the query parameters from URL in Next JS?
In nextjs we can easily get the query params with the use of useRouter() that we can import from 'next/router' then assign userRouter() to the router variable after that using router.query we can get the exact query string values. if you are passing multiple queries also we can get the values from router.query. ☞ Check out Next.js & … [Continue reading...]
iOS DatePicker tutorial (UIDatePicker) using Swift
iOS DatePicker control introduction In the Previous tutorial, we created UISegmentedControl example, now this project going to implement how to create an "iOS DatePicker" example using swift. UIDatePicker object using to select the specific date and time. If you are a documentation lover, you can read the UIDatePicker apple documentation here, a … [Continue reading...]
Recent Comments