Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

立即执行函数 #7

Open
dvlin-dev opened this issue Apr 4, 2022 · 0 comments
Open

立即执行函数 #7

dvlin-dev opened this issue Apr 4, 2022 · 0 comments
Labels
js JavaScript

Comments

@dvlin-dev
Copy link
Owner

dvlin-dev commented Apr 4, 2022

保存闭包的状态
模块模式

(function(){
   console.log(1)
})()
(function(){
   console.log(2)
}())

https://segmentfault.com/a/1190000007569312?_ea=1386755#comment-area

@dvlin-dev dvlin-dev added the js JavaScript label Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
js JavaScript
Projects
None yet
Development

No branches or pull requests

1 participant