學(xué)習(xí)Javascript的過程中,遇到了下面的問題:我需要封裝一個(gè)判斷對象類型的函數(shù) getType,得到的結(jié)果不合人意,如下:const getType = Object.prototype.toString.call// 判斷 target 的類型getType(target)// Uncaught TypeError: getType is not a function
請問這個(gè) `getType` 是一個(gè)函數(shù)嗎
慕森王
2019-03-14 18:15:29