Skip to content
the poor coder

Home / Author

Poor Man

2,994 posts
2023

exporting a class

Exporting a Class in JavaScript Exporting a class is an essential feature of object-oriented programming in JavaScript. It allows you to reuse the class in different parts of your application or share it with other…

javascript1 min read
2023

how to display first value of an array in jquery

How to Display First Value of an Array in jQuery Displaying the first value of an array in jQuery is a fairly simple task. First, we need to access the array and then retrieve the first value of that array. There are…

javascript2 min read
2023

angular call function every x seconds

How to call a function every x seconds in Angular If you want to call a function every x seconds in Angular, there are several ways to achieve it. One of the easiest ways is to use the setInterval() method in…

javascript2 min read
2023

convert array to conventional array js

Convert array to conventional array js As a JavaScript developer, it is important to have a clear understanding of arrays and how to manipulate them. One common task is converting arrays to conventional arrays. In this…

javascript2 min read
2023

switch alert

Switch Alert Switch alert is a pop-up or an alert that appears when a user toggles a switch or checkbox. It can be used to inform the user about the action they are about to perform, or to warn them about the…

javascript3 min read
2023

how to create server.js file

How to create server.js file If you're looking to create a server-side JavaScript application, you'll need to create a server.js file. This file will contain all the code necessary to handle incoming requests and serve…

javascript2 min read
2023

get the location of an item in an array

How to Get the Location of an Item in an Array If you are working with arrays in JavaScript, you may need to find the location of a specific item within the array. Fortunately, this can be done easily using built-in…

javascript3 min read
2023

passing data between components in react js

Passing Data Between Components in React JS If you are working on a React project with multiple components, you might need to pass data between them at some point. There are several ways to pass data between components…

javascript2 min read
2023

onselect javascript

Understanding onselect javascript As a web developer, you may come across situations where you want to perform some action when an option is selected from a dropdown list. In such cases, you can use the onselect…

javascript2 min read
2023

how to make a todo application in javascript

How to Make a Todo Application in JavaScript Introduction A todo application is a simple application that allows you to keep track of tasks or things that need to be done. You can use it to manage your personal tasks…

javascript4 min read
2023

server side rendering

Server Side Rendering Explained Server Side Rendering (SSR) is the process of rendering the HTML on the server before sending it to the client’s browser. This approach provides several benefits over client-side…

javascript1 min read
2023

discord.js start code

Discord.js Start Code If you want to build a Discord bot with JavaScript, Discord.js is one of the most popular libraries out there. Here's how to get started: Step 1: Install Node.js and Discord.js First, you need to…

javascript1 min read
2023

preventdefault not working react

PreventDefault Not Working in React: Causes and Solutions If you're working with React, you may come across a situation where preventDefault isn't working as expected. This can be frustrating, but there are several…

javascript2 min read
2023

axios.post headers example

axios.post headers example If you are working with axios, you might need to send some headers with your post requests. Headers are used to send additional information about the request. For example, you might need to…

javascript1 min read
2023

document middleware in express

Document Middleware in Express Document middleware in Express is a way to modify the request and response objects that pass through the middleware stack. It allows us to perform tasks such as logging, authentication…

javascript1 min read
2023

clear element children js

Clear Element Children in JavaScript When working with HTML elements in JavaScript, it is often necessary to remove all child elements from a parent element. This can be useful when resetting a form or updating a list…

javascript1 min read
2023

Highlight current nav link in react

Highlight current nav link in React Highlighting the current navigation link is a common requirement in web applications, especially in single-page applications built with React. When a user clicks on a link, you want…

javascript2 min read
ESC