Function calls in js and promotion of assignment statements

function speakA(){
    alert(this.name);
    alert(this.n);
    speakC();
}
function speakC(){
    this.name = "C";
    this.n = "ddd";

}
speakA();

output is C undefined

Why can the

alert statement output C before the this.name assignment statement, but the second output is undefined,? is it related to window.name? Is the window.name attribute assigned first by default?

Mar.17,2021

window.name is empty by default
during the life cycle of a window, all pages loaded by the window share a window.name


popular meaning upstairs. If you do not close this window tab, the value of window.name will not return to the original value
where this means that the first execution of window
results are "" and undefined
when speakC has already executed so the value of window.name is ddd
and then you don't see it clearly and want to see it again and press f5 to refresh. The window.name remains unchanged after refresh, and all other variables revert to the original value
, so at this time the value of window.name is CMagneWindow.n and the value of undefined

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3852e-40690.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3852e-40690.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?