Memory Allocations in JS

Memory Allocation when dealing with JS “Primitives”

let myNumber = 23
let newVar = myNumber
myNumber = myNumber + 1
let myString = 'abc'
myString = myString + 'd'

JavaScript’s memory model: the call stack and the heap

Memory Allocation when dealing with JS “non-Primitives”

let myArray = []

Let vs. const

let sum = 0
sum = 1 + 2 + 3 + 4 + 5let numbers = []
numbers.push(1)
numbers.push(2)
numbers.push(3)
numbers.push(4)
numbers.push(5)

Why is it OK to declare an array using “const” ?

const myArray = []
myArray.push(1)
myArray.push(2)
myArray.push(3)
myArray.push(4)
myArray.push(5)
myArray = 3
myArray = ['a']
const myObj = {}
myObj['newKey'] = 'someValue' // this will not throw an error

Google Recommendation:-

Experience with Front-end Technologies and MERN / MEAN Stack. Working on all Major UI Frameworks like React, Angular.