Kalyan Mishra has Published 64 Articles

How to swap two array elements in JavaScript?

Kalyan Mishra

Kalyan Mishra

Updated on 26-Jul-2022 14:33:55

4K+ Views

In this tutorial, we use different approach to swap two array elements in JavaScript. For example, we swap first and second element of the array asInput −["first", "second", "third", "fourth", "fifth"]Output −["second", "first", "third", "fourth", "fifth"]Here we swapped “first” and “second” value of the array.Now we will look at different ... Read More

How to build a random quote generator using HTML, CSS, and JavaScript?

Kalyan Mishra

Kalyan Mishra

Updated on 26-Jul-2022 14:25:30

1K+ Views

In this tutorial, we are going to build a project using HTML, CSS, and JavaScript which will be generating a random quote from an API (type.fit).StepsWe will be following some basic steps −Creating HTML Elements and TemplatesAdding Styles using CSSJavaScript LogicCreating HTML Elements and TemplatesThe first step is to create ... Read More

How to create HTML list from JavaScript array?

Kalyan Mishra

Kalyan Mishra

Updated on 26-Jul-2022 14:04:34

8K+ Views

In this tutorial, we are going to see multiple ways to create an HTML list from a JavaScript array. If we talk about simple HTML list, then we create manually one by one all the lists using ul (unordered list) and inside that li (list) tag.Consider a case when you ... Read More

How to check two numbers are approximately equal in JavaScript?

Kalyan Mishra

Kalyan Mishra

Updated on 26-Jul-2022 13:52:05

473 Views

In this tutorial, we will check if two numbers are approximately equal or not. In case given two numbers are equal then we will print yes, it is otherwise not it’s not.But let me make you clear that we are not going to do any magic here, basically we will ... Read More

Previous 1 ... 3 4 5 6 7
Advertisements