-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile47.js
More file actions
29 lines (23 loc) · 705 Bytes
/
Copy pathfile47.js
File metadata and controls
29 lines (23 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"use strict";
// hoisting
// // in the case of function declarition output is showing before declarlring function
// hello();
// function hello(){
// console.log("hello world");
// }
//same in the case of function expression showing error
// hello();
// const hello = function(){
// console.log("hello world");
// }
// same in the case of arrow function showing error
// hello();
// const hello = () =>{
// console.log("hello world");
// }
// what if we declare with different variables
console.log(hello);
// let hello = "hello world"; //showing error
var hello = "hello world"; //showing undefined
// const hello = "hello world"; //showing error
console.log(hello);