‘You went missing, leaving her alone in this remote house for four days.’ The angry son asked his dad.
‘It is all good now. Let him come in first. He should be hungry.’ Meera tried to ease the situation.
‘When did you come? It is good to see you back.’ Murti entered the house patting his only son.
‘I’m going to get Mom with me this time. It is not safe for her here. It has never been safe for her. She is sixty-seven.’
‘Oh. Yes. I see her luggage nicely packed already.’ Murti did not show any emotions.
‘We were afraid you won't come back Murti. Your son had to come all the way from *a developed nation*’ Murti’s long time friend Narayanan was there along with the other forest department who rescued Murti and others from the landslide. …
‘Today, we have Mr. Jorge Canmore with us. He is one of the global representatives of the Canmore community from the nation Canmore land. He has dedicated most of his life to bring justice to Canmores all over the world. Mr. Jorge, Before beginning this interview, I would like to inform the audience that this is not a criticism or commentary over a particular race, religion, culture, or any identity whatsoever. The sole purpose of this interview is to clear the ignorance and misconceptions in the common public about a subject that is becoming a discussion now. — Welcome Jorge.’ …
In an alternative reality, the concept of god was different. It was not faith-based as that civilization grew up with rationality. What are Gods doing in a reality of rationalists you may ask. Gods there, were pretty similar to the ones we have. In order to understand how Gods came into existence, we need to read about Neuvo, the first God.
When Neuvo proclaimed that he can make wonders happen, people around him laughed as required. But he eventually mastered the art of cosmic-fabric-fiddling and did godly stuff. He made people with disabilities walk, see, smell, and so on. So eventually, people from all over the world started pouring in to visit him. How many cases could he do? Whom did he prioritize? He treated the ones with the most pain or the ones who projected pain well. Through experience, His ability to solve issues scaled day by day from few cases a day to at least a hundred a day. Which hundred among the thousands of cases caught his attention? …
A closure is a function having access to the parent scope, even after the parent function has closed. — w3schools
Every function can access the variables declared in the chain of parent lexical environments.
So, the child functions have access to the parent functions scope. why do we need a term Closures when the term functional scope is descriptive enough? Closures is a behavior exhibited when we deal with the functional scope. Let's see what happens during the last 4 lines.
const f1 = func1()
const f11 = f1.func11()
const f112 = f11.func112()
1. func1 gets added to the execution stack on top of the base Global execution context.
2. func1 Allocates b=2 in the memory space.
3. func1 gets popped out of the execution context. …
IIFE is a widely used technique to create function scope for particular lines of code that require some privacy instead of writing everything in the global scope.
In the above example, It is clear that Andy and Mary need some privacy. So they decide to wrap their details with a function and tell the outer world only what they need to know.
This made things better but still, they do not want everyone to knock at their doors by invoking the globally exposed AndyMaryHouse function. So, they turned their function declaration into an IIFE.
They wrapped their function with a Grouping operator and invoked immediately after that. …
As the memory allocation for the variable a has already happened before executing the program line by line, we can access the variable at the very top of the execution context. In the above example, we have two lines of code in the global context. And the fact that only the declarations are hoisted makes the value of a undefined. …
Before getting on to the block scope, let's discuss how the scope chain works.
In the below example, the sibling functions func2 and helper have access to the variables declared in their common parent function func1 and the Global context.
‘Every day I see groups of poor children on the roadside begging for money and food. It has been seven years for me in this chair. Why is this suffering still happening? What am I missing?’ President Kaul Weiss asked his cabinet.
‘We have reduced the poverty rate from 40% to 30% now. We have raised the poverty line several times. So we are well on route to eliminate poverty.’ a minister said.
‘Not fast enough. It looked simple from outside but poverty seems to be a very hard fight.’ President said.
‘Already the welfare for below-poverty-people is eating so much of our nation's budget. Their education, food stamp, healthcare, etcetera takes 10% of our GDP. We are deficit continuously for 3 quarters now. …
‘If a person genuinely feels angry and kills his neighbor out of that, is it wrong?’ Swami Sukarman Gill asked his followers. ‘No’ he replied himself. ‘At least he was true to him and his feelings’.
He was known to his alternative thinking among the common public. He was put into jail a couple of times for his controversial preaching till the new president Barth Garner lifted all the laws that made the individual expression of feelings an offense. Barth Garner had a particularly strict childhood where her dad censored her from speaking some words and having some ideas. Barth believed restricting thoughts is restriction over ideas and natural human evolution. …
The world was torn apart after that apocalyptic event. The government took care of the food and supplied food every morning. If missed, families had to stay hungry till the food truck arrives the next morning. Muscle power played a role in collecting food in the queues. The survival of the families was proportional to the strongest being in the family.
Terry and Cleo were two men work together in a pact to safeguard food for their respective families. They were masculine and they never take more than what was needed. Terry and his family needed 6 units of food to survive every day while Cleo needed 5 units. Terry and Cleo themselves needed 1 unit of food every day to survive. Both the families were doing fine with 5 and 6 units of food every day. But the good times faded quickly. The mobs started hijacking the food truck before it arrives for the public. …