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 204 of 534
How To Run JavaScript Online?
In this tutorial, let us discuss the best way to run Javascript online. As we know, Javascript is a popular language. There are many options to run Javascript online. Optimizing runtime and memory usage is the challenge all these tools face. A simple way to run Javascript is the browser console. The browser console comes up when you press the F12 key. You can add the Javascript code within the script tag or load an external JavaScript file. Let us look into the available options to run Javascript online. Codepen To run Javascript using codepen, only enter the Javascript code ...
Read MoreGame Development Using JavaScript
In this tutorial, we will learn about whether we can create games using JavaScript or not. We can, of course. JavaScript games are entertaining, simple, and a fantastic method for youngsters to learn how to code. Nearly all internet websites employ the popular programming language known as JavaScript. A web application can be enhanced using JavaScript by adding animations and interactivity that improve gaming and web browsing. JavaScript's capacity to create games that can be played readily online is a common topic that draws young people to learn how to program. It makes sense that more game developers have been ...
Read MoreHow to disable right-clicking on a website using JavaScript?
To disable right-clicking on a website using JavaScript, you can use the contextmenu event to cancel the default behavior of the right−click. The contextmenu event is a DOM event that is triggered when a user right-clicks on an element in a user interface. It is a type of mouse event, similar to the click event, but it is specific to right-clicks. In JavaScript, you can use the addEventListener method to attach a contextmenu event listener to an element. The event listener function will be called whenever the contextmenu event is triggered on the element. Here's an example of how you ...
Read MoreRole of JavaScript in Software Companies?
In this article, you will learn about the importance and role of the JavaScript language in the software industry. Where do we use the language and how it helps in production in the software companies everything we will get to know. JavaScript is one of the web development languages used to add functionality to the website. It makes the website interactive, robust, faster, and prettier. It's a scripting, interpreted language that can be directly compiled in a web browser like C, or CPP; it doesn't need a compiler to compile. Basically, to develop a website we need three basic languages: ...
Read MoreVisually improving a website using JavaScript?
In this article, you will get to know about various techniques using which you can make your website attractive and fast. Which will increase user engagement and make your website productive. Let’s first get to know about JavaScript. What is JavaScript? JavaScript is one of the web development languages used to add functionality to the website. It makes the website interactive, robust, faster, and prettier. It's a scripting, interpreted language that can be directly compiled in a web browser like C, or CPP; it doesn't need a compiler to compile. This is the reason behind it turning out to be ...
Read MoreDisplay selected checkboxes on another page using JavaScript?
In this article, you will learn about how to get all the checked boxes on the other page using JavaScript. The checkbox is a type of selection that is a type of binary selection either true or false. It is an option of GUI form present on the page and using this we can take more input from the user. If a box is checked, it indicates true, which means that the user has selected the value and in case the box is unmarked then it indicates that the user has not selected the value. The difference between the checkbox ...
Read MoreSplitting an array into chunks in JavaScript
In this article the given task is to split array elements into n sized chunks in JavaScript. We have some approaches to perform the splitting operation on array, those will be discussed below. Let’s assume some simple input and output scenarios – Assume there is an array containing elements in it. Example, array = [10, 20, 30, 40] and let’s take the chunk size as 2. Input = [10, 20, 30, 40] Ouput = [[10, 20], [30, 40]] The elements will be divided into two chunks, the first argument specifies the starting index and the second argument specifies the ...
Read MoreDecimal count of a Number in JavaScript
Given there is a number with digits after decimal point and the task is to find the count of digits after the decimal point. Input Output Scenario Let’s look into the input output scenario, where there is a floating point number having some digits after decimal point. Input = 45.36346323 Output = 8 As we can in the above snippet there are 8 digits in the floating point number after the decimal point. To achieve the above task, we used three methods. Namely isInteger(), toString() and, split() method. Let’s see them one by one – Number.isInteger()method The ...
Read MoreRemoving all the empty indices from array in JavaScript
Given there is an array with some empty indices and need to remove those empty indices from array. Let’s look into the input output scenarios – Consider there is an array with some empty indices. Now we need to exclude them and return the elements which are having only truthy values. Array = [22, 45, , 56, 71, , 10]; Output = [22, 45, 56, 71, 10] As we can see in the output, the indices which are empty in the array got removed. We can achieve the above task by using several methods, let’s look into the ...
Read MoreFilter array based on another array in JavaScript
In this article, we are going to learn how to filter an array based on another array in JavaScript. An Array in JavaScript is used to store different elements. These elements are stored at contiguous memory locations. By using index numbers, we can access any or each data element present in the array. Index numbers will start form 0. Syntax Following is the syntax of the array in JavaScript – const array_name = [item1, item2, ...]; The following is the simple declaration of array in JavaScript, Const colors = ['Blue', 'Limegreen', 'Orange', 'Black']; Let’s assume some simple ...
Read More