Skip to content
the poor coder

Home / Topics / #javascript

#javascript

2,247 posts · page 74 of 113
2023

javascript set input value by class name

Javascript Set Input Value by Class Name As a web developer, I have come across situations where I needed to set the value of an input field by class name using Javascript. There are various ways to achieve this, and I…

javascript2 min read
2023

react useeffect async javascript

Understanding the React useEffect hook with async JavaScript If you've been working with React for a while, you're probably familiar with the useEffect hook. It's a powerful tool that allows you to manage component…

javascript2 min read
2023

how to declare an array in javascript

How to Declare an Array in Javascript As a web developer, I have worked with Javascript for years and declaring an array is one of the most common tasks I perform. Here are a few ways to declare an array in Javascript…

javascript1 min read
2023

regex remove duplicates

Regex Remove Duplicates Have you ever encountered situations where you need to remove duplicate values from a large dataset? This can be a tedious and time-consuming process if done manually. Luckily, regular…

javascript2 min read
2023

javascript character ascii value modify

Javascript Character ASCII Value Modify If you want to modify the ASCII value of a character in Javascript, you can use the charCodeAt() and fromCharCode() methods. Let's see an example: In this example, we first…

javascript2 min read
2023

LongestWord javascript

LongestWord javascript Have you ever faced a situation where you need to find the longest word in a string? Well, JavaScript has got you covered. Here are a few ways you can achieve this: Method 1: You can use the…

javascript2 min read
2023

get current url angular

How to get current URL in Angular If you need to get the current URL in your Angular application, there are a few different ways to do it. Here are some options: Using the Location Service You can use the built-in…

javascript2 min read
2023

javascript indexOf object value in array

How to use indexOf() method to find object values in an array using JavaScript? One of the most useful methods that JavaScript array objects provide is the indexOf() method, which allows you to find the index of a…

javascript2 min read
2023

Sequelize conditional shorthands

Sequelize Conditional Shorthands If you are working with Sequelize ORM for Node.js, you might come across situations where you need to define some conditional statements in your queries. Sequelize provides some…

javascript1 min read
2023

vue current year

Vue Current Year As a developer, it is important to be able to display the current year on a website or application. In Vue, there are multiple ways to achieve this. One way is to use the built-in Date object in…

javascript1 min read
2023

js add obj prop dynamically

How to dynamically add properties to JavaScript objects As a web developer, I often come across situations where I need to dynamically add properties to JavaScript objects. This can be easily achieved using JavaScript…

javascript1 min read
2023

how to program a button to work in javascript

Programming a Button in JavaScript If you want to add functionality to a button on your website, you can do so with JavaScript. Here's how: Step 1: Create the HTML Button First, create an HTML button element with an ID…

javascript2 min read
2023

remove all from array that matches

Removing Matching Elements from an Array in JavaScript When working with arrays in JavaScript, it is often necessary to remove certain elements from the array. One common scenario is when we need to remove all elements…

javascript2 min read
2023

iconMap richtoolbar

What is iconMap richtoolbar? iconMap richtoolbar is a feature in the RichTextEditor (RTE) that allows the user to add custom icons to the toolbar. This feature is especially useful when you want to add your own custom…

javascript2 min read
2023

zoom in canvas javascript

Zoom in Canvas JavaScript If you want to zoom in on an image or a canvas using JavaScript, you can do so by changing the scale factor of the canvas. Here are a few ways to accomplish this: Method 1: Using the scale()…

javascript2 min read
2023

create salt hash using bycrypt

Creating Salt Hash using Bcrypt If you want to store user passwords securely in your application, salt hashing is an essential technique to prevent attacks such as rainbow table attacks. Bcrypt is a popular library that…

javascript1 min read
2023

jest spy on console error

What is Jest Spy on Console Error? Jest is a popular testing framework used by developers around the world. It offers a range of tools that make it easier to perform various types of tests, including unit tests…

javascript2 min read
2023

react reveal for functional component

React Reveal for Functional Component React Reveal is a popular library that enables animation effects in React components. It provides a simple way to create stunning animations and add them to your React project with…

javascript1 min read
ESC