This question already has an answer here: What is the purpose of a ... That's called an IIFE, an Immediately-Invoked Function Expression.
www.google.com.tw