以下是一些js必须加分号的情况:
// 没有分号的话 ,Uncaught TypeError: xx is not a function
let x = 3;
(function t() {})()
// Uncaught TypeError: Cannot read properties of undefined (reading 'xxx')
const str = '123';
[1,2,3].map(item=>console.log(item*2))