adalah lingkup fungsi dan cakupan blok adalah sama

Function Scope: When a variable is declared inside a function, it is only accessible within that function and cannot be used outside that function
Block Scope: A variable when declared inside the if or switch conditions or inside for or while loops, are accessible within that particular condition or loop
Grieving Gorilla