Ayush Gupta has Published 486 Articles

What are the differences between lodash and underscore?

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 10:03:22

1K+ Views

lodash and underscore are both utility libraries that make JavaScript easier by providing utils that make working with arrays, numbers, objects, strings, etc. much easier. These libraries are great for −Iterating arrays, objects, & stringsManipulating & testing valuesCreating composite functionsThey are both functional libraries. Lo-Dash is a fork of Underscore, ... Read More

Difference between Backbone.js and Jquery

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 10:00:04

320 Views

Backbone is an MV* framework while jQuery is a DOM toolkit.With Backbone, you represent data as Models, which can be created, validated, destroyed, and saved to the server. Whenever a UI action causes an attribute of a model to change, the model triggers a "change" event; all the Views that ... Read More

Write the dependencies of backbone.js in javascript?

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 09:50:24

259 Views

The only hard dependency(without which backbone js won't work at all) is Underscore.js. Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.There are other dependencies required as you proceed to use more advanced features of backbone.js. For example, Libraries ... Read More

What is JSlint error "missing radix parameter" in JavaScript?

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 09:43:07

1K+ Views

The parseInt function available in JavaScript has the following signature −parseInt(string, radix);Where the parameters are the following −string − The value to parse. If this argument is not a string, then it is converted to one using the ToString method. Leading whitespace in this argument is ignored.radix − An integer ... Read More

What is the difference between `new Object()` and object literal notation in JavaScript?

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 09:41:34

689 Views

Both new Object() notation and Object literal({}) notations do the same thing. They initialize an object. However, the second notation can be a little different if you start adding properties to it.Examplelet a = {    name: 'Ayush' }This initialization is equivalent to −let a = new Object(); a.name = ... Read More

C++ program to find the Radius of the incircle of the triangle

Ayush Gupta

Ayush Gupta

Updated on 21-Nov-2019 12:57:23

287 Views

In this tutorial, we will be discussing a program to find the radius of the incircle of a given triangle.For this, we will be provided with the sides of a particular triangle and our task is to find the radius of the incircle in that triangle.The formula for finding the ... Read More

C++ program to find the quantity after mixture replacement

Ayush Gupta

Ayush Gupta

Updated on 21-Nov-2019 12:54:02

117 Views

In this tutorial, we will be discussing a program to find the quantity of milk left after mixture replacement.Let us suppose we have X litres of milk. From that, Y litres of milk is replaced with Y litres of water itself. This same procedure is done again and again Z ... Read More

Program to print the nodes at odd levels of a tree using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 07:13:41

183 Views

In this tutorial, we will be discussing a program to print the nodes present at the odd levels of a given binary tree.In this program, the level for the root node is considered as 1 and simultaneously the alternative level is the next odd level.For example, let us say we ... Read More

Program to print the longest leaf to leaf path in a Binary tree using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 07:10:17

453 Views

In this tutorial, we will be discussing a program to print the longest path that exists from a leaf node to another leaf node in a given binary tree.In other words, we have to print all the nodes that appear in the diameter of the Binary tree. Here, diameter (or ... Read More

Program to print the DFS traversal step-wise using C++

Ayush Gupta

Ayush Gupta

Updated on 01-Nov-2019 07:05:15

489 Views

In this tutorial, we will be discussing a program to print the steps of the traversal using Depth First Search in a given binary tree.This would include every step that occurs in the depth-first search including the backtracking procedure as well.During DFS, we will be traversing each node and simultaneously ... Read More

Advertisements