Shubham Vora

Shubham Vora

793 Articles Published

Articles by Shubham Vora

Page 60 of 80

Nvidia Interview Questions and Answers

Shubham Vora
Shubham Vora
Updated on 01-Nov-2022 1K+ Views

Nvidia is a leading manufacturer of high-end GPUs and mainly develops integrated circuits. Practice answering the most anticipated Nvidia interview questions is necessary for candidates. So here we are providing the most asked questions on Nvidia interviews. What are volatile variables? It is a keyword in programming languages. The goal of the volatile keyword is to prevent the compiler from optimizing objects that can change in ways the compiler cannot predict. Because their values can be altered at any time by code outside the scope of the current code, objects that have been declared to be volatile are excluded from ...

Read More

Set how many columns an element should span across with JavaScript.

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 410 Views

In this tutorial, we will learn to set how many columns an element should span across with JavaScript. Dividing long paragraphs or articles into many columns improves their readability. The ‘column-count’ CSS property divides the text into numerous columns. Set the columnSpan property to all if you want the columns to span across in JavaScript. To set how many columns an element should span across with JavaScript, we have multiple ways, and in this tutorial, we will discuss two of them − Set the columnSpan property Use the style.setProperty method Set the columnSpan Property In JavaScript, the columnSpan ...

Read More

Is it a good practice to end switch with defaults in JavaScript?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 952 Views

In this tutorial, we will learn if it is a good practice to end switch with defaults in JavaScript. In JavaScript, we generally use the if or if-else statements if we need to check any conditions. Still, if we need to check multiple conditions for an expression, it becomes very complex and unorganized, so we use the switch statements for that situation. The switch statement compares the value of an expression to a series of case clauses, then executes statements after the first case clause that matches the value, and so on, until a break statement is met. If no ...

Read More

How to work with document.body in JavaScript?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 10K+ Views

In this tutorial, we will learn how to work with document.body in JavaScript. Use the document.body property in JavaScript to get the body of the document, i.e., tag. The tag defines the body of the document. The entire content of an HTML document, including all headings, paragraphs, images, hyperlinks, tables, lists, and other elements, is contained in the element. In an HTML document, there can only be one element. In this tutorial, we will work with the document.body in JavaScript for − Change the background color of the body Add a new element at the ...

Read More

What does “use strict” do in JavaScript, and what is the reasoning behind it?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 325 Views

In this tutorial, we will learn what "use strict" does in JavaScript. The "use strict" is a directive. JavaScript 1.8.5 is its origin. The use strict directive says that the JavaScript code must run in the strict mode. The strict directive is not a statement but rather a constant expression. Earlier JavaScript versions ignore this expression. We can't use undeclared variables when writing the code in strict mode. Except for IE9 and lower versions, all modern browsers support this JavaScript directive. Strict mode allows us to write a cleaner code as it throws errors when we use undeclared variables in ...

Read More

What does the operator || do in a var statement in JavaScript?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 290 Views

In this tutorial, we will discuss what the operator || does in a var statement in JavaScript. The logical OR operator or logical disjunction on the operands returns true if any of the operand values are true, false, ’’, null, undefined, 0, and NaN are the false values. All other values are true. The logical OR operands must be either boolean, integer, or a pointer kind. The logical OR returns the latest operand if there is no true value. The logical OR executes from left to right. Users can follow the syntax below for using the logical OR operator. Syntax ...

Read More

What characters are valid for JavaScript variable names?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 6K+ Views

In this article, we will learn what characters are valid for JavaScript variable names. We use variables to save values. First, we have to define the variable, and then we can assign a value to it. We can use the variable name to access the variable in the code. With a variable name, we can reassign its value. As you adhere to a few principles, variable names are quite versatile. Rules A letter, dollar sign($), or underscore (_) must make up the first character. A number cannot be the initial character. Any letter, number, or underscore can complete the ...

Read More

What are the three types of errors I can expect in my JavaScript script?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 566 Views

In this tutorial, let us discuss the three types of errors we can expect in our JavaScript code. Errors are statements that block the execution of the program. During the compilation of the program, three types of errors can occur. These are syntax errors, run time errors, and logical errors. Syntax Errors Syntax errors are usual errors. Incorrect syntax causes parsing issues during the code interpretation. For example, add a semicolon instead of a colon in an object declaration. Syntax errors affect only the respective code thread. The remaining code works as it is. A grammatical mistake is the ultimate ...

Read More

What are the rules to be followed for Object Definitions in JavaScript?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 438 Views

In this tutorial, we will discuss the rules to follow for Object Definitions in JavaScript. JavaScript is an object-oriented scripting language. An object contains many properties. The property consists of a key and a value. The property is known as a method when this value is a function. Predefined objects are available in the browser. We can also define our objects. A real-life example of an object is a cup. The color, design, weight, and material are the main properties of a cup. The object name and the property name are case-sensitive. To define a property, we need to assign ...

Read More

Is there a way to print all methods of an object in JavaScript?

Shubham Vora
Shubham Vora
Updated on 31-Oct-2022 1K+ Views

In this tutorial, we will learn how to print all methods of an object in JavaScript. An object's property with a function declaration is known as a JavaScript method. Methods are represented as object attributes and functions. We refer to actions carried out on objects as JavaScript methods. It is also possible to call the objects without using parentheses. This is a reference to the method's owner object. The method manipulates data that is part of a Class. The Object that was called into a method is implicitly passed. A function connected to an object attribute is called a method. ...

Read More
Showing 591–600 of 793 articles
« Prev 1 58 59 60 61 62 80 Next »
Advertisements