Front End Technology Articles - Page 475 of 860

What are the differences between lodash and underscore?

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, and still follows Underscore’s API enough to allow it to serve as a drop-in replacement. But under the hood, it’s been completely rewritten, and it’s also added a number of features and functions that Underscore does not provide.Lo-Dash was created to provide more consistent cross-environment iteration support for arrays, strings, ... Read More

Difference between .extend() / .assign() and .merge() in Lodash library.

Abdul Rawoof
Updated on 02-Sep-2022 12:31:17

1K+ Views

The Lodash library is in JavaScript, which works on the top of ‘_.js’. It can be used while working with arrays, strings, objects, numbers, etc. The assign() method This function is used to copy the original object into a new object. The difference in this and the spread operator is when nested objects are present and if assign() is used to copy the object, then the nested object will not change and the other variables of the object can be changed. There are two parameters to the assign() function. The first parameter is curly braces {} which is used to ... Read More

Difference between Backbone.js and Jquery

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

281 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 display the model's state can be notified of the change so that they are able to respond accordingly, re-rendering themselves with the new information.While jQuery is a solid API for querying the DOM with support for event handling, deferred objects, and animations. It is best suited for things like querying ... Read More

What is an anonymous function in JavaScript?

Arnab Chakraborty
Updated on 23-Aug-2022 08:13:53

2K+ Views

Like other advanced languages, JavaScript also supports anonymous functions. From the word anonymous, it is clear that when a function has no identifier or no name, that function is called an anonymous function. The only difference between anonymous function and normal function is that normal function has names but anonymous functions do not have any Additionally, anonymous functions are used for simpler and shorter applications which are easier to maintain. In this article, we shall cover what is an anonymous function in JavaScript, how we can use them, their syntax and basic usage as well as advantages and limitations. ... Read More

What is Babel, and how will it help you write JavaScript?

Ayush Gupta
Updated on 27-Nov-2019 09:53:30

392 Views

Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backward-compatible version of JavaScript in current and older browsers or environments. Babel's plugins allow you to use the new syntax, right now without waiting for browser support.The main reasons to use babel JS are −Syntax transformation(Latest JS syntax to backward-compatible syntax.)Polyfill features that are missing in your target environment (through @babel/polyfill)Source code transformations (code modes)

Why do I need Babel JS?

Ayush Gupta
Updated on 27-Nov-2019 09:51:53

745 Views

Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backward-compatible version of JavaScript in current and older browsers or environments. Babel's plugins allow you to use the new syntax, right now without waiting for browser support.The main reasons to use babel JS are −Syntax transformation(Latest JS syntax to backward-compatible syntax.)Polyfill features that are missing in your target environment (through @babel/polyfill)Source code transformations (code modes)

Write the dependencies of backbone.js in javascript?

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

225 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 for RESTful persistence(Backbone.sync)History support via Backbone.RouterDOM manipulation with Backbone.View or Jquery

What is the architecture of backbone.js in javascript?

Ayush Gupta
Updated on 27-Nov-2019 09:48:50

187 Views

The BackboneJS gives a structure to the web applications that allows separating business logic and user interface logic.The architecture of BackboneJS contains the following modules -HTTP RequestThe HTTP client sends an HTTP request to a server in the form of a request message where web browsers, search engines, etc., acts like HTTP clients. The user requests for a file such as documents, images, etc., using the HTTP request protocol.RouterIt is used for routing the client-side applications and connects them to actions and events using URLs. It is a URL representation of the application's objects. This URL is changed manually by ... Read More

What is the use of backbone.js in structuring javascript?

Ayush Gupta
Updated on 27-Nov-2019 09:46:41

112 Views

Backbone is an MVC framework for the frontend. 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 display the model's state can be notified of the change so that they are able to respond accordingly, re-rendering themselves with the new information.Backbone gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions views with declarative event handling, and ... Read More

What is the use of .stack property in JavaScript?

Abdul Rawoof
Updated on 02-Sep-2022 12:02:25

598 Views

The Stack property in JavaScript is used to store and keep track of the errors and saves the information such as the type of the error, where the error is raised and the reason of the error. The path of the origin of the error is also stored in the stacks in JavaScript. Stack is the error class property in JavaScript, which is also used to store the functions that are called, the order of the functions called too. The format of the error shown is as first, in the first line the type of the error will be displayed ... Read More

Advertisements