代碼示例,JavaScript語言中,給function前加上感嘆號!的作用是什麼呢?
!function () {}();
添加“!”的目的JavaScript 中的函數之前是將其轉換爲函數表達式並立即調用它。這也稱爲立即調用函數表達式 (IIFE)
參考:javascript - What does the exclamation mark do before the function? - Stack Overflow
代碼示例,JavaScript語言中,給function前加上感嘆號!的作用是什麼呢?
!function () {}();
添加“!”的目的JavaScript 中的函數之前是將其轉換爲函數表達式並立即調用它。這也稱爲立即調用函數表達式 (IIFE)
參考:javascript - What does the exclamation mark do before the function? - Stack Overflow
https://github.com/zhangbo2008/Trie_with_informationExtraction_and_fuzzy_matchingv2