Skip to content
the poor coder

Home / Author

Poor Man

2,994 posts
2023

draw diamond in typescript

How to Draw a Diamond in TypeScript There are several ways to draw a diamond in TypeScript. Here are two different methods: Method 1: Using Canvas One way to draw a diamond in TypeScript is by using the HTML5 canvas…

javascript2 min read
2023

useDarkMode react hook

Using the Dark Mode React Hook As someone who spends a lot of time on their computer, I understand the importance of having a comfortable and easy-to-read interface. That's where dark mode comes in. One way to implement…

javascript2 min read
2023

reset countdown timer javascript

Reset Countdown Timer JavaScript If you are working on a countdown timer in JavaScript and want to reset it to its initial value, you can do so with a few lines of code. Method 1: Using clearTimeout() The first method…

javascript2 min read
2023

if contain in shopify liquid

If Contain in Shopify Liquid If you are working with Shopify Liquid code, you may come across the need to check if a certain value exists in a variable. In Liquid, you can use the "contains" operator to check if a value…

javascript2 min read
2023

angular interceptor

What is Angular Interceptor? Angular Interceptors are a powerful feature of Angular that allow you to intercept HTTP requests and responses. They provide a way to modify requests and responses, add custom headers…

javascript2 min read
2023

const name value = event.target

Explaining "const name value = event.target" in HTML If you are a beginner in JavaScript, you may have come across this line of code: This line of code is used to get the value of an input field or any element that is…

javascript2 min read
2023

pebbel if statement check boolean

Pebble if statement check Boolean The if statement in Pebble is used to evaluate a given condition and execute a block of code only if the condition evaluates to true. When the condition is a Boolean value, the if…

javascript2 min read
2023

speedtest-net node.js

Speedtest-net and Node.js Speedtest.net is an internet speed testing platform which provides accurate results of download/upload speeds, ping, and other network-related statistics. Node.js is an open-source…

javascript1 min read
2023

divide array into parts python

Divide Array into Parts in Python Dividing arrays into parts is a common task in programming. In Python, there are different ways to achieve this. Here are some ways to divide an array into parts: Method 1: Using…

javascript2 min read
2023

check if mobile view javascript

Check If Mobile View Javascript As a blogger and web developer, I always strive to provide the best user experience for my website visitors. One of the most important aspects of this is ensuring that my website is…

javascript2 min read
2023

event listener to elements with class

Event Listener to Elements with Class If you want to add an event listener to elements with a certain class, you can do so using JavaScript. Using document.querySelectorAll() The easiest way to select all elements with…

javascript1 min read
2023

scroll to top javascript

Scroll to Top JavaScript Have you ever found yourself scrolling through a long web page only to realize that you need to go back to the top? Scrolling all the way up can be tiresome and time-consuming. Luckily, there is…

javascript2 min read
2023

how to make chart js from zero

How to Make a Chart.js from Scratch Introduction Chart.js is a powerful tool that allows you to create beautiful, interactive charts for your website or application. In this tutorial, we will cover how to create a…

javascript2 min read
2023

JS class for each

JS class for each When it comes to iterating over arrays or objects in Javascript, there are several ways to achieve this. One of the commonly used methods is by utilizing the forEach method which is available on…

javascript2 min read
2023

js sort strings lowercase and uppercase

How to Sort Strings in JavaScript (Lowercase and Uppercase) Sorting strings in JavaScript can be done in various ways. Here are some of the most popular methods: Method 1: Using the localeCompare() method The…

javascript2 min read
2023

how re arange able component in vue.js

How to Arrange Components in Vue.js Vue.js is a flexible and powerful JavaScript framework used for building user interfaces. One of the main features of Vue.js is its component-based structure, which allows developers…

javascript3 min read
2023

js map array to dictionary

Converting a JavaScript Array to a Dictionary using the Map method Have you ever needed to convert a JavaScript array into a dictionary? Well, you've come to the right place! In this post, we'll discuss how to use the…

javascript2 min read
2023

open ilnk target js

Open link target js When you want to open a link in a new tab or window using JavaScript, you can use the window.open() method with a second argument specifying the target. Example: The second argument "_blank"…

javascript1 min read
ESC