Skip to content
the poor coder

Home / Author

Poor Man

2,994 posts
2023

Switching words in a string using replace

Switching words in a string using replace If you need to switch one word with another in a given string, you can use the replace() method in JavaScript. The replace() method will search for a specified value in a string…

javascript1 min read
2023

use useRef to get current class

How to Use useRef to Get Current Class? As a developer, I often find myself struggling with getting the current class of a component or element. Fortunately, React provides a built-in hook called useRef that can help us…

javascript2 min read
2023

groups Count js exercice

Groups Count JS Exercise As someone who loves coding, I always look for new challenges to improve my skills. Recently, I came across the Groups Count JS exercise that was both challenging and fun to solve. The exercise…

javascript2 min read
2023

vue.js cdn script

Vue.js CDN Script If you're looking to include Vue.js in your project without having to download and install it, you can use the Vue.js CDN (Content Delivery Network) script. Option 1: Using Vue.js CDN with script tags…

javascript2 min read
2023

onbeforeunload bypass alert box

Onbeforeunload Bypass Alert Box Have you ever tried to close a browser window with unsaved changes and got an alert box asking if you really want to leave the page? This is a common feature that web developers use to…

javascript1 min read
2023

not equal to in js

What is "not equal to" in JavaScript? In JavaScript, "not equal to" is a comparison operator used to compare two values to determine if they are not equal. This operator is denoted by the "!=" symbol. Example: In the…

javascript1 min read
2023

ES6 syntax for function in javascript

ES6 Syntax for Function in JavaScript JavaScript is a programming language that is widely used for building web applications. The latest version of JavaScript is ES6, which introduced many new features, including a new…

javascript2 min read
2023

nodejs socket es6

NodeJS Socket ES6 NodeJS is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Socket is a communication protocol used to establish a connection between a client and…

javascript1 min read
2023

disable button click jquery

How to Disable Button Click Using jQuery? If you want to prevent users from clicking a button in your webpage or web application, disabling the button is one way to do it. In this blog post, I will explain how to…

javascript2 min read
2023

otp sms mobile form jquery

OTP SMS Mobile Form jQuery OTP (One-Time Password) SMS is a secure way to verify the user's identity through a mobile phone. It is commonly used in two-factor authentication, login systems, and payment gateways. How to…

javascript2 min read
2023

Class method

Class Method A class method is a function that is associated with the class rather than an instance of the class. It can be called on the class itself, rather than on an instance of the class. Class methods are often…

javascript1 min read
2023

Error: listen EADDRINUSE: address already in use

Error: listen EADDRINUSE: address already in use If you are developing an application or running a server, you might have faced this error: "Error: listen EADDRINUSE: address already in use". This error occurs when you…

javascript3 min read
2023

javascript regex check if string is empty

How to Use JavaScript Regex to Check if a String is Empty If you are a web developer, you have probably come across the need to check if a string is empty. This can be done using JavaScript and Regex. Here's how: Method…

javascript1 min read
2023

javascript calculate time

JavaScript calculate time If you are working on a project that requires you to perform time-based calculations, then JavaScript is the right choice for you. JavaScript is a programming language that allows you to…

javascript2 min read
2023

beautifulsoup for javascript

BeautifulSoup for Javascript If you are a developer and have worked with web scraping, chances are you have used BeautifulSoup, a popular Python library for parsing HTML and XML documents. But have you ever wondered if…

javascript2 min read
2023

return new Promise(res => {

Understanding "return new Promise(res => {" in JavaScript As a web developer, I've come across the concept of Promises in JavaScript many times. Recently, I came across the code return new Promise(res => { and was…

javascript2 min read
2023

submit form when user click enter key in react

How to Submit Form When User Click Enter Key in React When building a form in React, it is important to ensure that it is user-friendly and easy to interact with. One way to achieve this is to allow users to submit the…

javascript2 min read
2023

regx get only domain name from url

How to extract only the domain name from a URL using Regular Expressions If you have a list of URLs and you want to extract only the domain name from each URL, you can do it using Regular Expressions (RegEx). Method 1…

javascript1 min read
ESC