Posts

Showing posts with the label javascript

JavaScript Interview Questions for Freshers

Image
What is JavaScript, really ? JavaScript ("JS" for short) is a full-fledged dynamic programming language that, when applied to an HTML document, can provide dynamic interactivity on websites. It was invented by Brendan Eich, co-founder of the Mozilla project, the Mozilla Foundation, and the Mozilla Corporation. JavaScript is incredibly versatile. You can start small, with carousels, image galleries, fluctuating layouts, and responses to button clicks. With more experience, you'll be able to create games, animated 2D and 3D graphics, comprehensive database-driven apps, and much more! *For online documentation on JavaScript , refer the doc of creators - mdn **For the best class-room training on JavaScript at Mumbai connect with Rocky Sir Leaving out the very simple and basic Interview Questions, at what questions do the fresh web developers get stuck ?   Here is a list : 1. Before-the-first-Round-of-JavaScript-Interview-Questions         download a ...

Understanding Synchronous and Asynchronous JavaScript - paRt_2: JavaScript - its DiFFereNt

Image
In the first part of this post , we saw how the concepts of synchronous and asynchronous are perceived in JavaScript. In this second part, Mr K  appears again to help us understand how the setTimeout() and AJAX APIs work. Let's go back in past to the story of Mr. K and the date you wanted to go on! but what if you leave a task for Mr. K before outing and tell him that he can only begin to work on this task five hours after  he got your message.   He isn’t happy about it! But why does Mr H leave a message in the queue instead of directly contacting Mr K? Because as I mentioned in the first part, the only way to contact Mr K is by leaving a message to him via phone call — no exceptions., remember, he doesn’t take a new message until he is done with the current one, and if he takes yours, he has to wait for five hours to even start on the task. So, to not be wasteful of time, he brings in a helper, Mr H. Instead of waiting, he asks Mr H to leave a new message for...

Understanding Synchronous and Asynchronous JavaScript - paRt_1 : JavaScript - its DiFFereNt

Image
In JavaScript Synchronous and Asynchronous are very important concepts. Beginners might find them difficult to learn. When two or more things happen at same time then it is Synchronous and when they don't that's Asynchronous . These definitions are easy to understand but it's complicated than it looks from here. So let's dig a little deeper.  You’d probably call a normal function in JavaScript synchronous, right? And if it’s something like setTimeout() or AJAX that you’re working with, you will refer to it as being asynchronous, yes? What if I tell you that both are asynchronous in a way? Let's understand with an example. We'll get help from Mr. K, Scenario 1:-> Mr. K is trying Synchronicity  Here’s the setup: Mr K is someone who can answer tough questions, and carry out any requested task. The only way to contact him is through a phone call. Whatever question or task you got, in order to ask Mr K’s help to carry it out; you call him...

SoMe-Things YoU sHould knOw about "PhoneGap": Android - LeaVe my baThRoom at-least !

Image
PhoneGap Framework Building applications for each platform–iPhone, Android, Windows and more–requires different frameworks and languages. PhoneGap solves this by using standards-based web technologies to bridge web applications and mobile devices. Since PhoneGap apps are standards compliant, they’re future-proofed to work with browsers as they evolve. The PhoneGap framework was contributed by the Apache Software Foundation (ASF) under the name Apache Cordova and graduated to top-level project status in October 2012. Through the ASF, future PhoneGap development will ensure open stewardship of the project. It will always remain free and open source under the Apache License, Version 2.0. To develop apps using Phonegap, the developer does not require top have knowledge of mobile programming language but should know languages like, HTML, CSS, JScript. PhoneGap takes care of rest of the work, such as look and feel of the app and portability among various mobile operat...

10 JavaScript Methods For DOM Manipulation for Web Developers : JavaScript

Image
To Specify the  logical structure  of the web pages, we web developers need to manipulate the  DOM  of the web page. Using this structure we could render  HTML elements  on the web page.  HTML defines the DOM structure . But in many cases we need to disturb this DOM structure to get the required output. We can  JavaScript  to manipulate this DOM structure.to add more functionalities to it. HTML DOM STRUCTURE Here are some functions using which you can manipulate the HTML DOM structure. < 1 > querySelectore() The  querySelecor()  methods returns the first element that matches with the mentioned name. If no match found it returns  null . Although getElementById() is a useful method, querySelector() and querySelectorAll() methods are used to target element based on any CSS selector freely which makes it more flexible. Syntax: var ele = document.querySelector( selector ); ele – First matching e...

AniMate bY Javascript : JavaScript

Image
To make the webpage dynamic we use animation. This animation can be implemented using both CSS and JavaScript. Here's how to use JavaScript animation in webpage. How does it work? The idea behind the JavaScript-based animation is fairly simple, a number of DOM elements (< /img>, < /div > or otherwise) are moved around the page according to some sort of pattern determined by a logical equation or function. You can use JavaScript to create a complex animation having following elements, Fireworks Fade effect Roll-in or Roll-out Page-in or Page-out Object movement An existing JavaScript animation library JavaScript provides the following two functions to be frequently used in animation programs. setTimeout( function, duration)   − This function calls   function   after   duration   milliseconds from now. setInterval(function, duration)   − This function calls   function   after every   duration milliseconds. clearTimeout(s...