Found 6685 Articles for Javascript

How to check the OffscreenCanvas is supported by the Browser or not in JavaScript?

Rushi Javiya
Updated on 19-Jan-2023 10:23:17

320 Views

In HTML, Canvas is very important when we want to show animation or 3D objects on the webpage using only HTML and JavaScript. The offscreenCanvas allows users to render the animations and graphics off-screen. It means when we use the canvas, it interacts with the user via the main thread of the web application, but offscreenCanvas doesn’t. So, we can improve the performance of the application using offscreenCanvas . Before we use offscreenCanvas with any browser, we need to check if it is supported by the Browser or not; Otherwise, we need to use canvas. So, we will learn two ... Read More

Extract unique objects by attribute from an array of objects in JavaScript

Rushi Javiya
Updated on 17-Jan-2023 09:54:24

6K+ Views

We will learn to extract unique objects by attribute from an array of objects in this tutorial. Sometimes, we need to filter objects from the array of objects based on a particular attribute. For example, we have an id as a key to identify the object. So, we need to ensure that the array contains only a single object with a single id. If two or more objects contain the same primary key value, it can cause the problem of uniquely identifying objects. Here, we will learn different approaches to filter all unique objects from the array based on a ... Read More

Explore the concept of JavaScript Function Scope and different types of JavaScript Functions

Rushi Javiya
Updated on 17-Jan-2023 09:50:37

608 Views

In JavaScript, various scopes allow us to access the functions and variables from different places in our code. We will learn about the function scope in this tutorial. Also, we will explore the different types of function expressions in JavaScript. Function Scope When we create a new function in JavaScript, it also creates the scope for that particular function. It means that whatever variables we declare inside the function or define the nested function inside it, we can only access it inside the function block. If we try to access the variables defined inside the function block from outside the ... Read More

Explain the purpose of the ‘in’ operator in JavaScript

Rushi Javiya
Updated on 17-Jan-2023 09:46:28

119 Views

This tutorial will teach about the ‘in’ operator in JavaScript. There are many operators available in JavaScript, such as arithmetic operators to perform mathematical operations, assignment operators, equality operators, etc. The ‘in’ operator is also one of them, which we can use to find properties from the object. Before we start, let me ask you a question. Have you ever needed to check for the existence of the object's properties while coding with JavaScript? If yes, how did you deal with it? The answer is simple you can use the ‘in’ operator, which returns the Boolean value based on whether ... Read More

Explain the concepts of functional programming in JavaScript

Rushi Javiya
Updated on 17-Jan-2023 09:43:02

185 Views

There are mainly two programming paradigms: The imperative programming paradigm and the declarative programming paradigm. Functional programming is a subtype of the declarative paradigm. The paradigm word refers to the approach to solving a particular problem. Functional programming has been in use for the last decades but came in the trend after 2015 when the last main revised version of JavaScript was released. There are many benefits to using functional programming, which we will discuss in this tutorial. Different Concepts of Functional Programming and their benefits Functional programming works as mathematical function works. It allows developers to develop software based ... Read More

Explain sub-classes and inheritance in ES6

Rushi Javiya
Updated on 17-Jan-2023 09:40:52

276 Views

In JavaScript, developers used the prototype to inherit the function with another function in ES5. In the ES6, classes introduced in JavaScript can be used for inheritance as other programming language does. What are sub-classes and inheritance? As the subclass word represents, it is a child class of another class. We can use inheritance to create or derive a subclass from the superclass, and we can call the class to a superclass from which we derive the class and the sub-class to the derived class. The subclass contains all the properties and methods of the superclass, and we can access ... Read More

10 Interesting things you can do with a few lines of JavaScript

Rushi Javiya
Updated on 17-Jan-2023 11:15:55

190 Views

In this tutorial, let us discuss some fascinating things that a few lines of Javascript can do. Almost every website uses JavaScript. JavaScript was born in 1995, and it is a programming language similar to other languages, but it runs faster because it doesn't have many predefined functions. JavaScript can create programs, libraries, and scripts for websites or desktop applications. A lot of web developers are also good at writing JavaScript. Some JavaScript codes are fascinating if you observe how it behaves. Let us discuss what are these fascinating things in JavaScript. Fascinating things about the semicolon The end of ... Read More

How to assign a PHP variable to JavaScript?

Rushi Javiya
Updated on 17-Jan-2023 11:00:42

19K+ Views

PHP tags with single or double quotes assign a PHP value to a JavaScript variable when setting a PHP variable. Several times you might need to put PHP variable values in JavaScript. You may easily echo on the JS variable with a PHP tag if there are only simple variables, such as a string or any integer. Understanding the sequence of actions when you access a PHP website is necessary before passing a variable from PHP to JavaScript. To create the HTML, the PHP will first run your.php file. Your code will be delivered to the client's browser when PHP ... Read More

Can JavaScript be used for Android Development?

Rushi Javiya
Updated on 16-Jan-2023 17:58:57

2K+ Views

Since smartphones are so close to people, mobile app development has begun to influence the world. A combination of languages, primarily JavaScript, CSS, and HTML, is utilized to construct all types of coding. The development of mobile apps is now one of the most crucial areas of current technology developments. The process of creating a mobile app involves a variety of technologies and procedures. Coding, which uses a range of languages to accomplish the process, is one of the most crucial components. JavaScript is a computer language that developers like due to a wide range of advantages. Major developers always ... Read More

How do I start learning JavaScript?

Rushi Javiya
Updated on 16-Jan-2023 17:56:58

181 Views

In the contemporary world, JavaScript is among the most widely used programming languages. Although it has certain additional use cases, web development is where people use it frequently, particularly when creating interactive front-end features. The top programming languages to learn, without a doubt, include JavaScript. If you want to work in any web development field, you must understand JavaScript. Sadly, learning a new programming language may be challenging, especially if you don't have a lot of prior expertise. Getting your head around the fundamentals can be contesting because coding concepts are challenging. Get Back to the Basics Although you may ... Read More

Advertisements