Khurram Mansoor

Khurram Mansoor Web & App Developer software Developer social media marketer

07/08/2026
JavaScript Function Declarations are fully hoisted. You can call the function anywhere in its scope, even before it appe...
05/08/2026

JavaScript Function Declarations are fully hoisted. You can call the function anywhere in its scope, even before it appears in the code.
JavaScript Function Expressions (including arrow functions) hoist only their variable declaration, not the assignment. Calling them before definition results in an error.
1. Function Declaration (Fully Hoisted)
JavaScript
// Works fine! Called before definition.
greet();
function greet() {
console.log("Hello, World!");
}
2. Function Expression with var (Undefined Error)
JavaScript
// TypeError: sayHello is not a function
sayHello();
var sayHello = function() {
console.log("Hello!");
};
var sayHello is hoisted as undefined, so invoking undefined() throws a TypeError.
3. Function Expression with let / const or Arrow Function (Reference Error)
JavaScript
// ReferenceError: Cannot access 'sayHi' before initialization
sayHi();
const sayHi = () => {
console.log("Hi!");
};
let and const variables enter a Temporal Dead Zone (TDZ) until the ex*****on reaches the definition.
hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag hashtag

Oracle software encompasses a broad suite of enterprise IT solutions developed by Oracle Corporation Database,forms,Repo...
04/08/2026

Oracle software encompasses a broad suite of enterprise IT solutions developed by Oracle Corporation Database,forms,Reports,PL \ SQL, Apex,RDMS,Graphics,Backup & Recovery,Cloud,AI,MY-SQL, Net-Suite, Fusion

I’m excited to share that I have successfully earned the Cisco. Netacad  JavaScript Essentials 2 certification! This mil...
03/08/2026

I’m excited to share that I have successfully earned the Cisco. Netacad JavaScript Essentials 2 certification! This milestone has strengthened my skills in core JavaScript concepts, problem-solving, and web development fundamentals. Looking forward to applying this knowledge to real-world projects.

I’m excited to share that I have successfully earned the Cisco JavaScript Essentials 2 certification! This milestone has...
03/08/2026

I’m excited to share that I have successfully earned the Cisco JavaScript Essentials 2 certification! This milestone has strengthened my skills in core JavaScript concepts, problem-solving, and web development fundamentals. Looking forward to applying this knowledge to real-world projects.

12 Types of JavaScript Functions  Function Declaration Function Expression Arrow Function Anonymous Function IIFE Callba...
25/07/2026

12 Types of JavaScript Functions
Function Declaration
Function Expression
Arrow Function
Anonymous Function
IIFE
Callback Function
Default Parameters
Rest Parameters
Parameterized Functions
Recursive Functions
Higher-Order Functions
Constructor Functions
Hoisting

Address

Karachi Sindh
Sindh

Alerts

Be the first to know and let us send you an email when Khurram Mansoor posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Share

Category