Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Javascript Articles
Page 214 of 534
Creating a Dynamic Report Card using HTML, CSS, and JavaScript
In this article, we are going to build a dynamic report using the inputs entered by the user. The user will enter the marks (in this case) and we will be populating these marks to calculate the final percentage of the student.We have also implemented the fail/pass status that will render whether a student has passed or failed based upon the entries done by the user. We will be using HTML, CSS, and JavaScript for the implementation.StepsWe will be creating an HTML template with rows and columns for name and subject scores. These subject scores will be further divided into ...
Read MoreHow to convert a string of any base to an integer in JavaScript?
An integer can be represented in various formats as described in the computed languages i.e. Binary, Decimal, Hexadecimal, etc. A Binary number consists of two digits only i.e. 0 & 1, whereas a decimal consists of digits from 0 to 9.We can convert a string to an integer by using the parseInt() conversion by default. But in other cases when the integer is represented in some other form we also need to pass the base string to decode it into the resultant number.Below is the syntax of parsing a string to an int.Syntax1. When the base value is providedparseInt(string_value, base)2. ...
Read MoreHow to compile a Typescript file?
In this article are going to explore TypeScript and how to execute the same. TypeScript is an open-source programming language developed and maintained by Microsoft.Typescript is a bit syntactically different from the native JavaScript but also adds additional features to it. Typescript is the superset of JavaScript with a strong pace of development and object-oriented programming. It also does not run directly on the web browsers as JavaScript runsTypescript files need to be combined with JavaScript first and then they work as normal JavaScript. In order to compile and execute the typescript file, we need to install the node and ...
Read MoreJavaScript: How to check whether an array includes a particular value or not?
In this article, we will be discussing the construction of an array. Once the array is created we will be looking out for a value by checking whether it exists in the array or not.But before checking for any particular value, let’s see how the arrays are created in JavaScript.Syntaxlet array = [arrayItem1, arrayItem2, arrayItem3 ...]Once the array is created, let’s see how to search for a specific value from the array. There are multiple approaches to searching for whether an element exists in the array or not. Below we are going to discuss the same.Approach #1This is a traditional ...
Read MoreHow to chain asynchronous functions in JavaScript?
JavaScriptis a single-threaded synchronous function that performs operations. It is a timeconsuming operation that blocks other operations of the thread.We can use the asynchronous programming provided by JavaScript that performs functions without blocking other operations of the thread. This can be done by asynchronous code like promises or async functions (which basically are cleaner promises).Asynchronous functions are cool but the time of their execution is not certain which might create a problem. Also, it is not easier to track async functions for any potential errors.In this article, we will be exploring the chaining of asynchronous functions using ES2015+ features like ...
Read MoreHow to call the constructor of a parent class in JavaScript?
In this article, we are going to explore constructors in an object. We can create inheritance in terms of object, i.e. a parent object can have one or multiple child objects. Now we can call the constructors of a parent object from the child object.ConstructorThese are the instances of a class that is commonly referred to as an Object. The new keyword from JavaScript uses a constructor to be called when an object needs to be declared or created. We can set properties into an object using these constructors.Inheritance in JavaScriptThis is the ability of an object to access the ...
Read MoreHow to call a JavaScript function in HTML?
In this article, we will be exploring the calling and initialization of the JavaScript function from an HTML template. We require the JavaScript function to execute the desired methods over the input passed.In this tutorial, we will be discussing two major approaches to calling a JavaScript function from an HTML page.In the first Approach, we are going to take a simple input tag and a Submit button associated with it. Once the button is clicked we will see a dialog box that pops up on the screen as an alert. This button on click calls invokes the JavaScript function to ...
Read MoreHow to add HTML elements dynamically using JavaScript?
In this article, we will be exploring how to add HTML elements dynamically so that they could change the view component. Also not just an HTML element, we can also add CSS properties to HTML elements with the help of JavaScript. In this article, we will be using a button to facilitate the addition of an HTML element in the already built template.ApproachWe will create a Simple HTML page with some components defined.Once the page is created we will be writing some outer HTML and adding a button to it so that we could add this HTML when a user ...
Read MoreHow to Add Google Maps to a Website?
In this article, we will be exploring Google Maps and how to add or embed google maps into our HTML template/website. Once the Google Maps are embedded into the website we can pin a location in it to display the user the current position of the store or a company.StepsBelow are the steps that need to be followed to embed Google Maps into your HTML pages −We need to generate an API key to be able to use Google maps privately.Creating the HTML container to place Google Maps.Adding the external script provided by Google inside the HTML document.Write the JavaScript ...
Read MoreHow does JavaScript work behind the scene?
JavaScript is a relatively new language with lots of new features and enhancements over the traditional HTML & CSS pipelines. With the new age era, JavaScript has captured most of the frontend market in a relatively lower period of time. It has gained tremendous popularity and is the go to language for any frontend needs.In this article, we are going to explore how does the traditional JavaScript works behind the frontend templates. How it processes the elements and how it executes them?JavaScript is a synchronous, single threaded language with specific order of execution.Everything inside a JavaScript function executes inside the ...
Read More