JS 闭包和自定义的问题!

第一个实现了效果  用立即调用函数   还有最后一行的(i)是使用完闭包就消除 为了防止占内存用的么?

580dbdbb000158ac05000230.jpg

第二个为什么没有实现效果   用自定义

580dbdbb0001250605000128.jpg


19990000
浏览 910回答 2
2回答

慕瓜9220888

XXBIRHLIOIJSSAZXGSYNMICGVMHMHIMGEESHGXCTXQARJFVAZCULOGFHBXWKHRFBHDPQCYAXZSPLESIJQOHUTMJCZHTHGFBSPMXWOQFYDNUEFJVIRXOFFBTMLUUYIHSGPFXQNXRGBJJFMSZJQYOGWGDFWLWFOXZMGRHFIHHKJWWMQPLRVICCGXXPIIWUOZRKTFOROPMAQILYNQHPNMCCIPPZZUKGFMDNWVUJSKIOABZTIYJARGESNEIFAMMGGPWQLDAWHMTSBGXJVAOSILDZUPAVYTSCUMUQTCLAQPFMKIXZLRRKBKBPCSRPVGSJMIJYHRIVOHIQJSUCKUQXCDWUMDTERAZGQHXPJPYOFDKFBJYBKUHULUJSRWWEXVZGMLELICEKFWVUHECCDBNWLCSJJCKJMFCSZZMKJLUVCRHIJCEKXWKATERGPQNNEHZHQTAHRBEBKTVITISKPBAQSZZQKYWFXOFVMNLBKZQQNRFXQCVITUUEMBGZWDOYMFMKJGQRBCBJSIOZJTXCLDCTAQRIQZBKRSYJTYNMXKXEVIJYQWDQQRCWUHNUUUGAGPUKQKBFEJFYQUBRSCHLSNORSRQFIHTXURIESLKTDARUBAZODUTAQEWIQZFWGKRFYHGNTUGTTMLKIBIQPXUAAHOPJEZBRDKHOOWKAZIFCMWDOXQVIPMOOGFKBYFWQOIHJIWWGHQOXWFCJPAZNQVUOFCESRQPYQNYYLDVWZMDKNDYXWCSCNZNSUCINLKHGLBGYAXOBIFCVVOFWXTQZHBCZQOXFDHIZBCCKCFKLDEQWPXKDRTMOBIWXQEOYSSJWLWEMVXCVKBQDULSMOGXEIFBIAKSCOSSBRJQFFKXEKEODFFTQGZVSIFGHJIACNNDPGZOULWFFIAKERVNBAQYSGNJCQFPG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