| by Arround The Web

for…in Loops in JavaScript – Key-Value Pairs

The “for…in” loop is used to iterate over each property and its value of an object, including any enumerable properties of its prototypes.

Share Button
Read More
| by Arround The Web

Delete First Character of String if it is 0 – JavaScript

To delete first character of string if it is 0, use the “slice()” method or “substring()” method with bracket notation or charAt() method for verifying index.

Share Button
Read More
| by Arround The Web

Pale Moon 32 Web Browser Released with Web Compatibility Features

The new Pale Moon 32 web browser release fully supports the ECMAScript 2016-2020 JavaScript specifications. Learn what’s new.
The post Pale Moon 32 Web Browser Released with Web Compatibility Features appeared first on Linux Today.

Share Button
Read More
| by Arround The Web

What is the Property in hasOwnProperty() in JavaScript

The hasOwnProperty() method in JavaScript returns results in the form of a boolean value if the particular property is the direct property of the object or not.

Share Button
Read More
| by Arround The Web

What is the “hasClass” Function With Plain JavaScript

Use the contains() method instead of the “hasClass” function in plain JavaScript because the “hasClass” function is the “jQuery” method.

Share Button
Read More
| by Arround The Web

window.onload vs document.onload in JavaScript

window.onload fires when the document’s window is ready for presentation and document.onload fires when the DOM tree is completed.

Share Button
Read More
| by Arround The Web

What is the Meaning of “$” Sign in JavaScript

The $ sign is not a special character in JavaScript. Still, it can be used as an identifier, function shortcut, or in template literals.

Share Button
Read More
| by Arround The Web

What is the instanceof Operator in JavaScript?

The “instanceof” operator determines the object type. If the object is an instance of the specified class, it gives “true”, else, it returns “false”.

Share Button
Read More
| by Arround The Web

What is the Difference Between call() and bind()?

The call() method binds “this” value to function and executes the function, whereas the bind() method binds “this” value to function and returns a new function.

Share Button
Read More
| by Arround The Web

Wait 5 Seconds Before Executing Next Line

To wait 5 seconds before executing the next line, use the “setTimeout()” method or the JavaScript “user-defined sleep()” function.

Share Button
Read More
| by Arround The Web

JavaScript delete vs splice

The delete operator deletes the element from an array but does not rearrange the array, while the splice() method rearranges the array.

Share Button
Read More
| by Arround The Web

JavaScript isset() Equivalent

The “typeof” operator, “Object.hasOwnProperty()” method or the “in” operator are the equivalents to the isset() in JavaScript.

Share Button
Read More
| by Arround The Web

JavaScript – How to Play Audio?

To play audio in JavaScript, implement the play(), pause() methods and controls attribute in combination or the autoplay property.

Share Button
Read More
| by Arround The Web

JavaScript: Client-side vs Server-side

Client-side JavaScript adds interactivity and dynamic functionality to websites, while server-side JavaScript builds back-end server applications.

Share Button
Read More
| by Arround The Web

Is JavaScript Compiled or an Interpreted Language

JavaScript is an interpreted language, but due to JIT, it acts as a compiled language. JS code is compiled because every browser currently supports “JIT”.

Share Button
Read More
| by Arround The Web

How to Write Macros in ONLYOFFICE Docs

You can write and run JavaScript macros in ONLYOFFICE Docs to perform monotonous operations using a Linux system. Here’s how.
The post How to Write Macros in ONLYOFFICE Docs appeared first on Linux Today.

Share Button
Read More
| by Arround The Web

Musicly: Simple Music Player

Musicly is a simple, elegant music player written in JavaScript. Learn more about this Electron and React-based music player.
The post Musicly: Simple Music Player appeared first on Linux Today.

Share Button
Read More
| by Arround The Web

First Steps With the Mermaid Diagramming and Charting Tool

Mermaid is a Javascript-based tool that renders markdown-inspired text definitions to create diagrams. In this tutorial you’ll learn how to start with Mermaid and render your first diagram.
The post First Steps With the Mermaid Diagramming and Charting…

Share Button
Read More
| by Arround The Web

Map an Array of Arrays – JavaScript

To map an array of arrays using JavaScript, apply the forEach() and push() methods in combination or the flatMap() method.

Share Button
Read More
| by Arround The Web

How to Detect a Mobile Device With JavaScript

The JavaScript API “window.matchMedia()” with CSS “media queries” is used to detect a mobile device with JavaScript. This is the efficient and easiest way.

Share Button
Read More