AmitDiwan has Published 10740 Articles

How do JavaScript primitive/object types passed in functions?

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 14:01:21

252 Views

Following is the code to pass JavaScript primitive and object types to function −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 18px;       font-weight: 500;   ... Read More

innerHTML vs innerText in JavaScript.

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:55:22

1K+ Views

innerHTML − The innerHTML property returns the text, including all spacing and inner element tags. It preserves the formatting of the text and all the extra tags like , etc.innerText − The innerText property returns just the text, removing the spacing and the inner element tags.Following is the code ... Read More

Undeclared vs Undefined? In JavaScript

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:52:48

1K+ Views

Undeclared − It occurs when a variable which hasn’t been declared using var, let or const is being tried to access.Undefined − It occurs when a variable has been declared using var, let or const but isn’t given a value.Following is the code for undeclared and undefined in JavaScript −Example Live ... Read More

Validating a file size in JavaScript while uploading

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:51:30

1K+ Views

Following is the code for validating a file size in JavaScript while uploading −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-size: 18px;       font-weight: 500;   ... Read More

Higher-Order Arrow Functions in JavaScript.

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:40:12

400 Views

JavaScript treats functions as objects and allow us to pass functions as parameter to another function and even return functions from other functions. In JavaScript, the functions are first class functions i.e. we can store them in variable, objects and array. The higher order arrow functions can take function, return ... Read More

Disabling arrow key in text area using JavaScript.

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:35:40

342 Views

Following is the code for disabling arrow key in text area in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-weight: 500;       font-size: 18px;   ... Read More

Setting full screen iframe in JavaScript?

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:33:03

2K+ Views

Following is the code for setting full screen iframe in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;    }    .result {       font-weight: 500;       font-size: 18px;       ... Read More

Explain load events in JavaScript?

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:19:58

804 Views

The page load events in JavaScript are fired when the page loads or unloads. Following are the events −EventDescriptionDOMContentLoadedThis is fired when the dom tree has been built but external resources like stylesheets ,images, etc are still not loaded.LoadIt is fired when the browser fully loads all the resources.BeforeunloadIt is ... Read More

Explain Scroll events in JavaScript.

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:18:16

396 Views

The scroll event in JavaScript is fired when the user interacts with a scrollbar by moving it up or down.Following is the code for scroll events in JavaScript −Example Live Demo Document    body {       font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;   ... Read More

Explain touch events in JavaScript

AmitDiwan

AmitDiwan

Updated on 16-Jul-2020 13:16:23

5K+ Views

The touch events in JavaScript are fired when a user interacts with a touchscreen device.Following are the pointer event propertiesEventDescriptiontouchstart.It is fired when the touch point is placed on the touch surface.touchmoveIt is fired when the touch point is moved along the touch surface.touchendIt is fired when the touch point ... Read More

Advertisements