AmitDiwan has Published 10744 Articles

Escape characters in JavaScript

AmitDiwan

AmitDiwan

Updated on 17-Jul-2020 07:12:58

9K+ Views

Escape characters are characters that can be interpreted in some alternate way then what we intended to. To print these characters as it is, include backslash ‘\’ in front of them. Following are the escape characters in JavaScript −CodeResult\bBackspace\fForm FeedNew Line\rCarriage Return\tHorizontal Tabulator\vVertical Tabulator\'Single quote\"Double quote\BackslashFollowing is the code implement ... Read More

How do JavaScript primitive/object types passed in functions?

AmitDiwan

AmitDiwan

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

228 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

976 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

373 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

321 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

771 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

371 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

Advertisements