You are here: Home / Topics / Search / JavaScript
Showing 28 Search Results for : JavaScript

What are the types of errors in javascript?

By Geetam on 06 Aug 22 | Filed under: JavaScript Interview Questions
There are two types of errors in javascript.Syntax error: Syntax errors are mistakes or spelling problems in the code that cause the program to not execute at all or to stop running halfway through. Error messages are usually supplied as well.Logical error: Reasoning mistakes occur when the syntax i  ......

What is DOM?

By Geetam on 06 Aug 22 | Filed under: JavaScript Interview Questions
DOM stands for Document Object Model.  DOM is a programming interface for HTML and XML documents.When the browser tries to render an HTML document, it creates an object based on the HTML document called DOM. Using this DOM, we can manipulate or change various elements inside the HTML document.

What do you mean by BOM in Javascript?

By Geetam on 06 Aug 22 | Filed under: JavaScript Interview Questions
Browser Object Model is known as BOM. It allows users to interact with the browser. A browser's initial object is a window. As a result, you may call all of the window's functions directly or by referencing the window. The document, history, screen, navigator, location, and other attributes are avai

What do mean by prototype design pattern?

By Shyam Dubey on 05 Aug 22 | Filed under: JavaScript Interview Questions
The Prototype Pattern produces different objects, but instead of returning uninitialized objects, it produces objects that have values replicated from a template – or sample – object. Also known as the Properties pattern, the Prototype pattern is used to create prototypes.The introduction of bus  ......

Explain WeakSet in javascript

By Ruchi Sharma on 02 Aug 22 | Filed under: JavaScript Interview Questions
In javascript, a Set is a collection of unique and ordered elements. Just like Set, WeakSet is also a collection of unique and ordered elements with some key differences:Weakset contains only objects and no other type.An object inside the weakset is referenced weakly. This means, that if the object   ......

Why do we use callbacks in Javascript?

By Ruchi Sharma on 02 Aug 22 | Filed under: JavaScript Interview Questions
A callback function is a method that is sent as an input to another function (now let us name this other function "thisFunction"), and it is performed inside the thisFunction after the function has completed execution.JavaScript is a scripting language that is based on events. Instead of waiting for  ......

Methods to include JavaScript in HTML Code?

By Shyam Dubey on 16 Jul 22 | Filed under: JavaScript
Javascript can be added to our HTML code in mostly 2 ways:Internal Javascript: Javascript in this case is directly added to the HTML code by adding the JS code inside the <script> tag, which can be placed either inside the <head> or the <body> tags based on the requirement of the u  ......

What are the features of JavaScript?

By Shyam Dubey on 16 Jul 22 | Filed under: JavaScript
Following are the features of javascript:It was developed with the main intention of DOM manipulation, bringing forth the era of dynamic websites.Javascript functions are objects and can be passed in other functions as parameters.Can handle date and time manipulation.Can perform Form Validation.A co

What do you mean by strict mode in javascript and characteristics of javascript strict-mode?

By Deepak Sahoo on 04 Jul 22 | Filed under: JavaScript Interview Questions
In ECMAScript 5, a new feature called JavaScript Strict Mode allows you to write a code or a function in a "strict" operational environment. In most cases, this language is 'not particularly severe' when it comes to throwing errors. In 'Strict mode,' however, all forms of errors, including silent er  ......

What is NaN property in JavaScript?

By Deepak Sahoo on 04 Jul 22 | Filed under: JavaScript Interview Questions
NaN property represents the “Not-a-Number” value. It indicates a value that is not a legal number.typeof of NaN will return a Number.To check if a value is NaN, we use the isNaN() function,Note- isNaN() function converts the given value to a Number type, and then equates to NaN.isNaN("Hello") &n  ......

Explain Hoisting in javascript

By Monu Rathod on 03 Jul 22 | Filed under: JavaScript Interview Questions
Hoisting is the default behaviour of javascript where all the variable and function declarations are moved on top.This means that irrespective of where the variables and functions are declared, they are moved on top of the scope. The scope can be both local and global.Example 1:hoistedVariable = 3;
  ......

What are the different data types present in javascript?

By Monu Rathod on 02 Jul 22 | Filed under: Javascript
To know the type of a JavaScript variable, we can use the typeof operator.Primitive types String - It represents a series of characters and is written with quotes. A string can be represented using a single or a double quote.Example :var str = "Vivek Singh Bisht"; //using double quotes
var str  ......

What are disadvantage of JavaScript?

By Indresh on 29 Jun 22 | Filed under: JavaScript
Some of the disadvantages of JavaScript are:

a)    No support for multithreading
b)    No support for multiprocessing
c)    Reading and writing of files is not allowed
d)    No support for networking applications.

List some features of JavaScript

By Indresh on 29 Jun 22 | Filed under: JavaScript
Some of the features of JavaScript are:
1.    Lightweight
2.    Interpreted programming language
3.    Good for the applications which are network-centric
4.    Complementary to Java
5.    Complementary to HTML
6.    Open source
7.    Cross-platform 

What is JavaScript?

By Indresh on 29 Jun 22 | Filed under: JavaScript
JavaScript is a scripting language. It is different from Java language. It is object-based, lightweight, cross-platform translated language. It is widely used for client-side validation. The JavaScript Translator (embedded in the browser) is responsible for translating the JavaScript code for the we