Skip to main content

Posts

Showing posts with the label AJAX Advantages and Disadvantages JavaScript

JavaScript Let vs Var - When should let be used over var?

Let Keyword - The “ let ” keyword declares a block-scoped variable. Let and var declared outside any block, both are global. The “ let ” keyword allows you to declare a variable that are limited in scope to the block, statement, or expression on which it’s used. You can assign values to the variables when you declare them or later in your script. If you do not initialize your variable in the “ let ” statement, it is automatically assigned the JavaScript value. Let variables cannot be re-declared while var variable can be re-declared in the same scope. A variable declared by “ let ” can’t be used before its declaration or an error will result. A variable declaration with “ let ” is helpful when we want the scope of a variable to be limited to statement or expression level. Let gives you the privilege to declare variables that are limited in scope to the block, statement of expression unlike var. The “let” statement declares a local variable in a block sco...

31 Best AJAX Interview Questions and Answers -[Asynchronous JavaScript and XML]

What is AJAX and how does it work? The AJAX stands for “ Asynchronous JavaScript and XML ” and AJAX is a technique to creating interactive web applications and allows us to send and receive data asynchronously without refreshing the web page. The  XMLHttpRequest  object is part of a technology called  AJAX . AJAX is very faster and easy, we can implement AJAX in a meaningful manner. It is a group of related technologies looks like, a)     HTML/XHTML and CSS b)     DOM c)      XML or JSON d)     XMLHttpRequest e)     JavaScript The AJAX was popular in 2005 by  Google , with  Google Suggest . Syntax - The parameters specify one or more name/value pairs for the AJAX request. $ . ajax ({ name:value , name:value , ... }) Why do you use Ajax? The AJAX stands for “ Asynchronous JavaScript and XML ” ...