Ayush Gupta has Published 541 Articles

The Pros and Cons of Using Ajax

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 10:35:33

5K+ Views

Ajax is a set of web development techniques using many web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behavior of the existing page.Any other technology Ajax also has its ... Read More

Safely setting object properties with dot notation strings in JavaScript

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 10:34:36

626 Views

You can use lodash's set method to set properties at any level safely. Setting first-level properties are pretty straightforward. Nested property access is tricky and you should use a tested library like lodash for it.You can set a deeply nested object in the following way −Examplelet _ = require("lodash"); let ... Read More

Safely Accessing Deeply Nested Values In JavaScript

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 10:27:51

294 Views

You can use lodash's get method to get properties at any level safely. Getting first-level properties is pretty straightforward. Nested property access is tricky and you should use a tested library like lodash for it.You can access a deeply nested object in the following way −Examplelet _ = require("lodash"); let ... Read More

Accessing nested JavaScript objects with string key

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 10:23:09

2K+ Views

You can use lodash's get method to get properties at any level safely. Getting first-level properties is pretty straightforward. Nested property access is tricky and you should use a tested library like lodash for it.You can access a deeply nested object in the following way −Examplelet _ = require("lodash"); let ... Read More

How to Send and Receive JSON Data to and from the Server

Ayush Gupta

Ayush Gupta

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

3K+ Views

JavaScript can send network requests to the server and load JSON. JS does this using something called AJAX. AJAX stands for Asynchronous JavaScript and XML. JS has an API, fetch, to GET(receive) and POST(send) information to the server.You can use fetch to GET JSON data in the following way −Exampleconst ... Read More

Query-string encoding of a Javascript Object

Ayush Gupta

Ayush Gupta

Updated on 27-Nov-2019 10:16:51

135 Views

The query string is made up of query parameters and used to send data to the server. This part of the URL is optional. It needs to be constructed by the developer. This can be done using a native method called encodeURIComponent.The encodeURIComponent() function encodes a Uniform Resource Identifier (URI) ... Read More

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

185 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

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

Ayush Gupta

Ayush Gupta

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

141 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 ... Read More

Why do I need Babel JS?

Ayush Gupta

Ayush Gupta

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

435 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 ... Read More

Advertisements