Found 217 Articles for Javascript Library

Adding or removing elements from a list dynamically using VueJS?

Mayank Agarwal
Updated on 12-Apr-2023 16:23:42

2K+ Views

Vue can be defined as a progressive framework for building the user interfaces. It has multiple directives that can be used as per the user needs. The basic core library is mainly focused on building the view layer only and is also easy to pick up other libraries or integrate with them. We can dynamically add or remove elements from a list in VueJS using the v-model directive. All the possibilities are binded to a single channel while using this directive. When the user selects an option out of several options, the same will be added to the list. On ... Read More

How to use underscore.js as a template engine?

Shubham Vora
Updated on 06-Apr-2023 15:42:01

641 Views

A straightforward and lightweight templating technique for creating dynamic information within HTML is offered by the JavaScript library known as Underscore.js. A template must be defined in the HTML file using the script tag and a custom type attribute to use underscore.js as a template engine. The template should be contained in the script tag's contents, which can also contain variables and JavaScript expressions. The _.template() function compiles the template and returns a function that can be called with data object to produce the desired result. The ability to call the built function with any data object makes creating dynamic ... Read More

Explain clearTimeout() function in Node.js

Prabhdeep Singh
Updated on 17-Mar-2023 13:37:29

330 Views

There is a timer module in node.js that is used to schedule timers and carry out specific functions at a later time. In Node.js the JavaScript function clearTimeout() is used to halt the execution of the setTimeout() function by using the timeoutID returned by a specific setTimeout() function call. This function does nothing if the timeoutID didn't match for any prior calls or if an invalid value is given. The setTimeout() JavaScript function executes the specified code after the user-specified amount of time or delay, and it returns an ID, which is a positive integer commonly referred to as the ... Read More

Explain Class Methods in Coffeescript

Prabhdeep Singh
Updated on 04-Apr-2023 11:51:39

78 Views

To understand the class methods in CoffeeScript first we need to understand what it is CoffeeScript. CoffeeScript is a lightweight programming language, and this language compiles in JavaScript and is also inspired by languages like JavaScript, python, ruby, Haskell, etc. Further, we will discuss it in detail after that we are going to discuss class methods in CoffeeScript with its syntax of it an example with a full explanation and in the end, we conclude it. Introduction of CoffeeScript As we discussed above it is a lightweight programming language that compiles in JavaScript. It is basically an effort to make ... Read More

Explain Built-in Events in Backbone.js

Prabhdeep Singh
Updated on 17-Mar-2023 13:27:27

239 Views

There are various events that are present in Backbone.js and these events are called built-in Events. As the name suggests programmers and users already define built-in events and can directly use them. Also as per the requirements, a user can create his/her own event which doesn’t comes under the built-in Events. A remarkable quality that an event provides a user is that it adds the event listeners to the related selector, custom selectors, el. Also if none of the selection is provided then both the related selector and el event listeners are attached. Backbone.js Introduction Backbone.js is a toolkit or ... Read More

Features of Underscore.js

Shubham Vora
Updated on 17-Mar-2023 12:48:09

133 Views

Underscore.js is a lightweight library and compatible with all major browsers, as well as Node.js. It can be useful when working on projects involving a lot of data manipulation, as it provides several powerful tools for working with arrays and objects in JavaScript. Underscore.JS is a popular utility library; many other JavaScript libraries and frameworks like Backbone.js, AngularJS, and React.js use it as a dependency. Before we talk about its features, you can go to the official website of Underscore.js (http://underscorejs.org/) and download the minified version (underscore-min.js) of the library. We will set the path of this version in the ... Read More

How to sorting an array without using loops in Node.js?

Shubham Vora
Updated on 06-Mar-2023 12:38:44

892 Views

In Node.js, a built-in sort() method is available to sort an array without a headache. However, as a beginner to learn how the sort() method works internally, users should learn various sorting algorithms. In this tutorial, we will learn a different algorithm to sort an array without using loops in NodeJS. Use the setInterval() method The setInterval() method allows us to invoke any particular function after each interval. Also, we can store the id of the setInterval() method in any variable and use it later to clear the interval. So, we can call a callback function in the ... Read More

How to create refs in ReactJS?

Shubham Vora
Updated on 28-Feb-2023 17:14:40

344 Views

In ReactJS, refs are used to referring any node of the document. Generally, we can pass the props to children elements to interact with children from the parent’s state. Still, sometimes the child component is out of the typical dataflow of components. For example, we have four components, and dataflow is second is a child of the first, third is a child of the second, and fourth is a child of the third component. To interact with the fourth component from the first component, passing props from every component is not good practice. So, we can use refs to interact ... Read More

How to create progress bar in ReactJS?

Shubham Vora
Updated on 28-Feb-2023 17:13:27

9K+ Views

We can use the progress bar to track how many percentage of a particular task is completed. Maybe you have seen the progress bar on many websites while uploading a file, and it is one of the best use cases of the progress bar to show the uploaded percentage of uploading the file. Another best use case of the progress bar is showing the download completion percentage. We can use different CSS styles for the progress bar to animate and improve user experience. In this tutorial, we will learn to create a progress bar using libraries and from scratch ... Read More

How to Create Phone numbers and Contacts List in ReactJS?

Shubham Vora
Updated on 28-Feb-2023 17:11:44

701 Views

We can assume that you have used mobile devices to call someone and seen the contact list. Generally, when you open the phone book on most mobile devices, it will show you three sections. The first is a keypad to dial a custom number, the second is recent calls, and the third is saved contacts in the device. The recent contact section shows recent calls with names, numbers, and call duration. The normal contact list section shows your contact name with your contact number. Here, we will design a contact list in ReactJS using the basic functionalities of ReactJS. ... Read More

Advertisements