在看一些框架源碼時(shí)常常用到:
Array.prototype.slice.call(arguments)
來把一個(gè)方法的參數(shù)(偽數(shù)組)轉(zhuǎn)換為一個(gè)真正的數(shù)組,這里為什么說 arguments是偽數(shù)組呢?
為什么說arguments是偽數(shù)組?
犯罪嫌疑人X
2018-12-07 04:13:15