Hoisting in Functions in Javascript

functionName(); // Chaitanya

function functionName() {
	console.log("Chaitanya");
}

What will be the output of the following code?

var x = 21;

var fun = function () {
	console.log(x); 
	var x = 20;
};

fun();

?
https://youtu.be/btwFJT_xzdg?t=755&si=V4wkk0Q37IwVnLV0