How to compare two strings in javascript if condition?

There are many methods in Javascript by which we can compare two strings. Such as Abstract Equality Comparison (==) and Strict Equality Comparison (===). The strict equality operator (===) behaves identically to the abstract equality operator (==) except no type conversion is done, and the types must be the same to be considered equal. so … Read more

How to check if the shift key is pressed in Javascript?

In this blog, we will know how to check if the shift key is pressed in Javascript? We have many methods to check but we know the easiest methods. Method 1: Using shiftKey The KeyboardEvent.shiftKey read-only property is a boolean value that indicates if the shift key was pressed ( true ) or not ( false ) Html … Read more

Don’t Allow Special Characters in Textbox Javascript

Whenever we create a contact form or user form. We want that no user should input a special character, because there may be a hacking script. Which can destroy or hack our database or project file. In this blog post, we will learn how don’t allow special characters in textbox javascript. First, make a textarea … Read more

How to Add Two Variables in Javascript?

In this blog, we will learn how to add two variables in javascript. Generally, whenever we try to add two numbers in javascript using “+”, we get the result 2+2 = 22. while we expect 4. So first we have to tell javascript that we want to add integer types value. For this, we can … Read more

How to Draw Shapes with Javascript?

Through JavaScript, we can draw many shapes on the HTML canvas. We will draw many shapes in javascript in this blog post, so let’s start. Draw Rectangular Shapes in javascript HTML Javascript Result Draw Circle Shapes in javascript Html Javascript Result Draw a right-angled triangle in javascript Html Javascript Result Similarly, we can draw many … Read more