Build a Random Quote Generator Using HTML, CSS, and JavaScript

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

2K+ 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 HTML elements and templates. We first add a box in which items will be shown, then we will add a button when the button will be clicked that it will display a new random quote in the box, then span tag is used to show quote sign type font awesome ... Read More

Create HTML List from JavaScript Array

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

10K+ 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 will have n number of items and you have to print that in a list then it will be a really hectic task to write all the items and print manually right? Then using the JavaScript iteration method this can be easily done.Let’s see various ways in JavaScript to create ... Read More

Check Two Numbers Are Approximately Equal in JavaScript

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

646 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 also have to give an epsilon value.So, when we calculate the absolute difference between those two numbers and then compare with the epsilon then if absolute difference is lesser than the epsilon then the numbers are approximately equal else not approximately equal.Suppose two numbers given is 6.79 and 6.75 and ... Read More

Return True if the Bottom of the Page is Visible Using JavaScript

Prince Varshney
Updated on 26-Jul-2022 08:54:57

1K+ Views

In this tutorial, we will check if the bottom part of a page is visible or not to the user. We can do this functionality by using the height of the window and the height of the scrolled window. To write this code we need to understand three methods of JavaScript which are given asscrollY − It is the read-only property of the window, and returns the pixels a document has scrolled vertically.window.scrollYscrollHeight −It is an HTML DOM element and a read-only property of the window. It returns the height of an element’s content including the content that is not ... Read More

Pause and Play a Loop Using Event Listeners in JavaScript

Prince Varshney
Updated on 26-Jul-2022 08:50:15

1K+ Views

In this article, we are going to understand how we can pause and play a loop whenever we want using event listeners and promises in JavaScript. Pause and play to a loop refers to as a for loop is running and we want to make a pause in between any position in a loop or want to play it again.An event listener can be attached to any element to control how the event reacts to bubbling. It attaches an event handler to an element.SyntaxFollowing is the syntax of an event listener −element.addEventListener(event, function, useCapture);Parametersevent − it is the name of ... Read More

Check Current Runtime Environment is a Browser in JavaScript

Prince Varshney
Updated on 26-Jul-2022 08:38:51

3K+ Views

A runtime environment is an environment where your code will be executed. It tells what global objects your code can access and it also impacts its result. A JavaScript code can run in different types of environments some of them are Node.js, Service Workers, or in a web browser. So, to start coding in JavaScript, you don’t have to install any additional software. Each web browser comes with a JavaScript engine. You can simply run scripts you write inside any browser but it ensures that it follows all the rules of the ECMAScript (ES6) functionality.Here we will detect in which ... Read More

Reverse a String in Place in JavaScript

Shubham Vora
Updated on 26-Jul-2022 07:37:53

2K+ Views

In this tutorial, we will learn to reverse a string in place in JavaScript. How to reverse a string is one of the most popular questions asked in the interview of freshers. It’s an easy task but the interviewer can be tricky and make the same question difficult for you. For example, what if the interviewer asks you to write a pseudo code to reverse a string in place without using the extra space? You should have an answer ready in your mind for this kind of tricky question.There are lots of ways to reverse a string. As developers develop ... Read More

Difference Between ERP and SAP

Pradeep Kumar
Updated on 26-Jul-2022 07:03:33

4K+ Views

Every company will, at some time, find it necessary to implement a management system of some kind. This will allow the company to more effectively manage its information and resources, which will, in turn, lead to an improvement in the overall effectiveness of the company's operations.In order to effectively manage the business processes and automate the majority of the functions connected to technology, services, and human resources, there must be a plan to place a system of apps that are integrated with one another. The goal is to improve productivity by automating company processes in order to cut down on ... Read More

Difference Between Stack and Array

Pradeep Kumar
Updated on 25-Jul-2022 10:22:58

8K+ Views

The storing and arranging of data in a predefined format so that it can be retrieved and modified in efficient ways is one of the many things that you will want to accomplish, and Data Structures are the building blocks that make it possible. Data Structures are essentially logical representations of data that are used to store data in an ordered fashion in order to facilitate the execution of a variety of operations on the data.Within a single computer programme, we have access to a variety of different ways to store and retrieve information. If you are using an object-oriented ... Read More

Difference Between MapReduce and Spark

Pradeep Kumar
Updated on 25-Jul-2022 10:20:21

2K+ Views

Both MapReduce and Spark are examples of so-called frameworks because they make it possible to construct flagship products in the field of big data analytics. The Apache Software Foundation is responsible for maintaining these frameworks as open-source projects.MapReduce, also known as Hadoop MapReduce, is a framework that enables application writing, which in turn enables the processing of vast amounts of data on clusters in a distributed form while maintaining fault tolerance and reliability. The MapReduce model is constructed by separating the term "MapReduce" into its component parts, "Map, " which refers to the activity that must come first in the ... Read More

Advertisements