Home Tutor

Home Tutor

Share

this is where students of any grad can get tutors at their door step and teachers with some spare time can earn some extra money by offering home tuitions

Learn Resize Observer In 5 Minutes 05/01/2022

https://youtu.be/M2c37drnnOA

Learn Resize Observer In 5 Minutes Resize Observer is an amazing tool in JavaScript that allows you to easily and efficiently do complex media query style calculations. What makes resize obser...

05/12/2021

Callbacks
In javascript, a callback is simply a function that is passed to another function as a parameter and is invoked or executed inside the other function. Here a function needs to wait for another function to execute or return value and this makes the chain of the functionalities (when X is completed, then Y executed, and it goes on.). This is the reason callback is generally used in the asynchronous operation of javascript to provide the synchronous capability.

In the example notice that greeting passed as an argument (callback) to the ‘processUserName’ function. Before the ‘greeting’ function executed it waits for the event ‘processUserName’ to execute first.

17/11/2021

IIFE
What is an IIFE in JavaScript?
IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.
(function ()
{// logic here })
();
Your first encounter may seem quite confusing but actually, the pattern is simple. The pattern is immediately invoked function expression.
JavaScript functions can be created either through a function declaration or a function expression. A function declaration is the “normal” way of creating a named function.
A function created in the context of an expression is also a function expression. The key thing about JavaScript expressions is that they return values.
In both cases above the return value of the expression is the function.
That means that if we want to invoke the function expression right away we just need to tackle a couple of parentheses on the end.

17/11/2021
Want your school to be the top-listed School/college in Lahore?
Click here to claim your Sponsored Listing.

Category

Address


Lahore