1
本週剛剛開始學習javascript。我有一個很noob問題。 exports.displayName = (undefined: ?string);
意味着什麼反應原生?什麼是exports.displayName =(undefined:?string);意味着在反應原生?
這是試圖初始化未定義到exports.displayName作爲字符串
由於編碼器!
本週剛剛開始學習javascript。我有一個很noob問題。 exports.displayName = (undefined: ?string);
意味着什麼反應原生?什麼是exports.displayName =(undefined:?string);意味着在反應原生?
這是試圖初始化未定義到exports.displayName作爲字符串
由於編碼器!
對於可選字符串,看起來像是(Flow?TypeScript?)類型註釋。它不是Javascript語法。是的,它的初始值爲exports.displayName
,值爲undefined
。
非常感謝你! – phongyewtong
你可以請添加一些你的代碼給出這個錯誤? –
你是否使用了錯誤? http://stackoverflow.com/questions/9522233/javascript-undefined-empty-strings-and-if-statements – jmargolisvt
您是否使用三元運算符?。如果是看看這個鏈接 https://msdn.microsoft。 com/en-us/library/be21c7hw(VS.94).aspx – brk