According to you, who is Soul javascript?

Firstly, we will discuss functions in javascript, and then we get to know the soul of JavaScript.

On a broad level, the function is a block of code that accomplished a specific task. The process can take data in and return results. But in javascript words, the above description isn’t adequate toward js.

  • We could call a function as many times in the same code.
  • The function can be called inside a function. This process is known as recursion.
  • All instruction inside block executed top to bottom.

The above piece of lines may…


Introduction

ECMAScript Standards are being followed by the JavaScript engines. The job of these standards is to give a definition, how JavaScript engines should work. It also tells what kind of features it should have.
If we talk generally, high-level languages such as JavaScript, C has been abstracted from machine language. In comparison to C or C++, JavaScript is abstracted much further from the machine level. C and C++ are much closer to hardware among others that’s the reason which makes it much faster.

Before starting the journey toward Js Engine we should know where Exactly the Js engine has been…


What You Will Learn Here?

  • let vs var — General Difference.
  • Hoisting
  • Temporary Dead Zone

To understand Hoisting and Temporary Dead Zone first we should know the scope difference of let and var.

  • var and let are both used for variable declaration in javascript but the difference between them is that var is function scoped and let is block scoped.
function fun(){
if(true){
var foo = 5
let bar = 5
}
console.log(foo)
console.log(bar) //ReferenceError: bar is not defined , because bar varible isn't function scope, bar is only block scope variable
}
fun()

‘“In JavaScript, we can use a variable after its declaration and…


Scope

Scope in JavaScript refers to the current context of code, which determines the accessibility of variables to JavaScript. In simple terms, we can say How our program organized and accessed the variable “where we can access”.

A lexical scope in JavaScript means that a variable defined outside a function can be accessible inside another function defined after the variable declaration. But the opposite is not true; the variables defined inside a function will not be accessible outside that function.

There are two kinds of scope — Global scope and Local scope.

Global Scope

Variables defined outside a function are in…


Call Stack is used by JavaScript to keep track of multiple function calls. It is like a real stack in data structures where data can be pushed and popped and follows the Last In First Out (LIFO) principle. We use a call stack for memorizing which function is running right now.

JavaScript can do one single thing at a time because it has only one call stack.

When we execute a JS program a Global Scope is created internally by JavaScript as var window = Window() (rough equivalent) behind the veil.

Ritik Chopra

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store