Problems with js Arrow function and const declaration

encountered an interesting problem with the arrow function:

clipboard.png

clipboard.png

fun2()
constvar

clipboard.png
after this result becomes normal, I change to const, and everything is normal. There is only a problem with the first declaration for const. Do not know what the situation, ask God to explain, thank you!

< hr >

there is no problem that the browser is not refreshed, using the latest version of Chrome browser

May.05,2021

this disappeared when I turned const into a var declaration.

because var becomes window.name

when defined on window .
has a problem only the first time it is declared for const.

you print window.name , or turn off tab , and you find it is null again. Refresh is useless because the browser ( chrome ) will not change to window just because you refresh it.


const | | let does not mount declared to window

debugger is the

mounted in the domain Script.
Menu