Get Loop Counter/Index Using for…of Syntax in JavaScript
To get the loop counter or index using the for…of syntax in JavaScript, use the array.entries() method with for…of loop.
Read MoreTo get the loop counter or index using the for…of syntax in JavaScript, use the array.entries() method with for…of loop.
Read MoreThe “for…in” loop is used to iterate over each property and its value of an object, including any enumerable properties of its prototypes.
Read MoreTo 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.
Read MoreThe 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.
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.
Read MoreUse the contains() method instead of the “hasClass” function in plain JavaScript because the “hasClass” function is the “jQuery” method.
Read Morewindow.onload fires when the document’s window is ready for presentation and document.onload fires when the DOM tree is completed.
Read MoreThe $ sign is not a special character in JavaScript. Still, it can be used as an identifier, function shortcut, or in template literals.
Read MoreThe “instanceof” operator determines the object type. If the object is an instance of the specified class, it gives “true”, else, it returns “false”.
Read MoreThe 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.
Read MoreTo wait 5 seconds before executing the next line, use the “setTimeout()” method or the JavaScript “user-defined sleep()” function.
Read MoreThe delete operator deletes the element from an array but does not rearrange the array, while the splice() method rearranges the array.
Read MoreThe “typeof” operator, “Object.hasOwnProperty()” method or the “in” operator are the equivalents to the isset() in JavaScript.
Read MoreTo play audio in JavaScript, implement the play(), pause() methods and controls attribute in combination or the autoplay property.
Read MoreClient-side JavaScript adds interactivity and dynamic functionality to websites, while server-side JavaScript builds back-end server applications.
Read MoreJavaScript is an interpreted language, but due to JIT, it acts as a compiled language. JS code is compiled because every browser currently supports “JIT”.
Read MoreYou 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.
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.
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…
To map an array of arrays using JavaScript, apply the forEach() and push() methods in combination or the flatMap() method.
Read More