[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"contentNavigation":3,"newsletter-stats":4,"$fQa3xUpnRDPNiFFu2QS4K-DAjYmsapeR9fNhPNBdpkOc":-1,"news-article-closures-explained-how-functions-remember-their-scope":6},[],{"confirmedCount":5},405,{"article":7,"engagement":1418,"relatedArticles":1421,"tags":1422},{"content":8,"createdAt":9,"embedding":10,"id":1404,"image":1405,"isAffiliate":1406,"isPublished":1407,"publishedAt":1408,"slug":1409,"sourceId":1410,"sourceName":1411,"sourceSlug":1412,"sourceType":1412,"sourceUrl":1413,"summary":1414,"title":1415,"updatedAt":1416,"url":1417},"A function in JavaScript remembers the scope it was created in, even after that scope has finished executing. Learn what closures are, why the loop bug happens, and how to use them in practice.","2026-05-26T12:00:00.501Z",[11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,105,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,136,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,199,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,97,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,189,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,300,360,361,362,363,364,365,366,367,141,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,35,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,37,433,434,435,436,437,438,57,439,440,441,442,443,444,148,232,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,150,463,464,465,466,467,468,469,102,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,293,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,97,378,505,506,507,508,509,510,511,512,513,414,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,391,550,461,551,552,553,554,555,556,557,558,559,560,561,562,529,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,86,582,583,584,389,585,586,169,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,544,45,604,605,606,607,608,609,610,611,386,612,613,614,615,616,617,618,619,620,277,621,622,623,624,625,626,413,627,628,629,630,631,632,633,634,635,636,86,637,638,639,640,641,642,643,644,645,646,647,648,38,649,650,651,484,652,653,654,655,17,656,657,658,659,660,661,662,663,481,664,665,666,667,668,669,220,670,287,671,672,89,673,674,675,676,677,678,679,680,681,419,682,683,652,684,685,644,686,687,688,689,296,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,349,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,244,521,740,741,742,743,744,745,746,747,748,749,750,751,326,752,308,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,289,792,793,794,795,796,797,798,799,800,801,802,803,727,804,805,806,807,808,809,810,811,812,813,814,815,816,817,316,818,819,820,821,822,823,824,825,826,621,827,828,829,607,830,831,832,833,834,835,693,836,837,421,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,207,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,381,590,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,483,900,901,902,612,903,904,464,905,882,906,907,908,909,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,225,511,758,925,926,927,928,929,690,930,506,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,720,950,951,952,953,954,955,956,957,958,959,960,536,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,280,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,356,1005,1006,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,847,1021,1022,1023,240,1024,226,1025,1026,1027,1028,1029,1030,1031,832,1032,1033,918,1034,815,1035,29,342,1036,1037,1038,1039,1040,1041,1042,934,680,1043,1044,179,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,419,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,707,1084,1085,1086,799,1087,1088,317,595,1089,260,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1000,1102,1103,1104,1105,1106,1107,1108,300,1109,1110,496,1111,872,1112,1113,1114,1115,1116,1117,1118,1119,1120,1121,1122,1123,642,1124,1125,1126,1127,1128,1129,1130,47,1131,1132,1086,1133,1134,458,1135,849,1136,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146,404,1147,1148,1149,801,1150,1151,1152,1153,1154,1155,1156,1157,1158,1159,752,1160,1161,1162,716,1163,251,865,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,602,1174,1175,1176,346,1177,395,1178,1179,1180,1181,1182,1183,993,1184,1185,1186,1187,1188,1189,673,1190,1191,568,1192,1193,1194,1195,1196,1197,1198,1199,815,1200,1201,1202,1203,1204,1205,1206,1207,1208,1209,1210,1211,1212,1213,1214,1215,1216,472,1217,1218,1219,1220,1221,1222,1223,1224,967,1225,1226,1227,1228,1229,1230,86,1231,1232,1233,1234,1235,1236,1237,1238,1239,1240,1241,954,1242,1243,210,1244,1245,1246,22,1247,1248,1249,1250,951,1251,1252,404,1253,1254,1255,1256,1257,1258,1242,952,1259,1260,653,1261,1262,1263,1264,1265,926,1266,1267,1268,1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284,1285,1181,1286,1287,1288,1289,362,1290,1291,1292,1075,1293,1294,1295,1296,1297,1298,482,1299,1079,352,1300,383,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1312,1313,1314,204,1315,1316,935,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1331,1332,965,1333,1334,1335,947,1336,1337,1338,1063,407,1339,1340,1341,1342,1343,1344,1345,1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1356,1357,1358,1359,1360,1361,1362,445,1195,1363,348,1364,1365,1366,84,1367,1368,1369,1370,1371,1372,1373,1374,318,1375,1376,1377,1378,1379,1380,1381,1382,1383,1043,1384,1385,1386,1387,310,1388,1389,1186,1390,1391,539,1392,1393,1394,1395,1396,1397,1398,1399,1400,1401,1402,1093,1403],0.0128173828125,0.033050537109375,0.0172119140625,0.0040283203125,0.017303466796875,0.0250091552734375,-0.037628173828125,0.005496978759765625,0.05572509765625,0.01446533203125,0.05548095703125,-0.06536865234375,-0.0090484619140625,0.033599853515625,-0.0101776123046875,-0.004119873046875,-0.0026416778564453125,0.01421356201171875,0.0209503173828125,-0.00359344482421875,0.043365478515625,-0.0013017654418945312,0.00293731689453125,0.047637939453125,0.015838623046875,-0.058685302734375,-0.02685546875,0.0484619140625,0.040252685546875,-0.003307342529296875,0.0226287841796875,-0.0208282470703125,-0.026702880859375,-0.004596710205078125,0.008148193359375,0.01314544677734375,0.01183319091796875,-0.071044921875,0.009246826171875,0.0318603515625,-0.038604736328125,-0.04180908203125,-0.048553466796875,-0.03778076171875,0.04632568359375,0.006488800048828125,0.0182037353515625,0.01519775390625,-0.035491943359375,0.08758544921875,0.0298309326171875,-0.004268646240234375,0.0232086181640625,0.06439208984375,-0.05859375,0.010345458984375,-0.043731689453125,0.0469970703125,0.004779815673828125,0.03594970703125,0.047698974609375,-0.037506103515625,-0.0006270408630371094,0.00984954833984375,-0.052001953125,0.02044677734375,-0.01232147216796875,0.00786590576171875,-0.018829345703125,0.02294921875,0.03729248046875,-0.0016851425170898438,-0.01617431640625,-0.01425933837890625,-0.0059051513671875,-0.0254669189453125,0.07513427734375,0.040802001953125,0.0164337158203125,0.020477294921875,0.07525634765625,-0.0297088623046875,0.0018815994262695312,-0.01153564453125,-0.00689697265625,0.0167999267578125,-0.0159759521484375,0.036285400390625,-0.03094482421875,-0.0027618408203125,-0.0171966552734375,0.04852294921875,-0.04278564453125,0.01800537109375,0.04754638671875,0.0281524658203125,-0.05731201171875,-0.0386962890625,0.035675048828125,0.01361083984375,0.02740478515625,-0.052032470703125,-0.00943756103515625,-0.032623291015625,0.045562744140625,-0.0021266937255859375,-0.0215606689453125,-0.0191650390625,0.01470947265625,0.001712799072265625,-0.077392578125,0.01045989990234375,-0.008514404296875,0.0158843994140625,-0.002353668212890625,0.0025272369384765625,-0.032379150390625,0.00701141357421875,0.00133514404296875,0.02874755859375,0.0112152099609375,0.054656982421875,-0.024169921875,-0.0169525146484375,0.01983642578125,-0.01549530029296875,0.040283203125,0.019195556640625,0.042144775390625,-0.0189208984375,0.03662109375,0.0175323486328125,-0.01042938232421875,-0.0655517578125,-0.0450439453125,-0.0006766319274902344,-0.0141448974609375,-0.0256805419921875,-0.000732421875,0.0131378173828125,0.0194854736328125,-0.0205841064453125,0.07550048828125,0.0116729736328125,-0.0011548995971679688,0.0693359375,0.0357666015625,0.020660400390625,-0.0105438232421875,0.06500244140625,-0.0310211181640625,0.02166748046875,0.0036716461181640625,0.039764404296875,-0.01311492919921875,-0.022003173828125,-0.004680633544921875,-0.0177001953125,0.03350830078125,-0.0290679931640625,0.0207366943359375,0.016021728515625,0.0033626556396484375,-0.01116943359375,-0.0008168220520019531,-0.00785064697265625,-0.001613616943359375,-0.029388427734375,-0.027496337890625,-0.0318603515625,-0.0615234375,-0.057586669921875,-0.0031871795654296875,-0.00014781951904296875,-0.03692626953125,0.03509521484375,0.00975799560546875,0.022369384765625,-0.01300048828125,-0.01861572265625,0.00295257568359375,-0.0172271728515625,-0.002223968505859375,-0.00045609474182128906,-0.004657745361328125,-0.025177001953125,-0.01407623291015625,0.00817108154296875,-0.049835205078125,0.01702880859375,0.0218353271484375,0.024169921875,-0.006549835205078125,-0.0161895751953125,0.0133056640625,-0.0113677978515625,-0.03656005859375,-0.0672607421875,-0.01349639892578125,0.01459503173828125,0.056732177734375,-0.030426025390625,-0.002918243408203125,0.04095458984375,0.0233612060546875,0.0208740234375,0.008331298828125,0.00467681884765625,-0.01526641845703125,0.0008440017700195312,0.0223846435546875,-0.03057861328125,0.0044708251953125,0.07049560546875,0.0360107421875,0.029754638671875,0.0256500244140625,0.0233001708984375,-0.0201263427734375,0.0704345703125,0.01245880126953125,0.0152130126953125,-0.0082855224609375,0.004058837890625,0.0080108642578125,0.00803375244140625,0.0267333984375,0.0193328857421875,0.0032176971435546875,-0.024078369140625,0.030426025390625,0.030242919921875,-0.0244903564453125,-0.033599853515625,0.00365447998046875,-0.042327880859375,0.0035400390625,-0.016021728515625,-0.004161834716796875,0.037811279296875,0.0146636962890625,0.032806396484375,-0.037261962890625,-0.00510406494140625,0.00417327880859375,-0.0001404285430908203,0.050537109375,0.0012350082397460938,0.037841796875,0.0103607177734375,0.0019664764404296875,-0.01462554931640625,0.055755615234375,0.021392822265625,0.056182861328125,0.00514984130859375,-0.0110321044921875,-0.09747314453125,0.00640106201171875,-0.0031833648681640625,-0.031768798828125,0.01337432861328125,-0.01123809814453125,0.044403076171875,0.0379638671875,-0.04376220703125,0.016937255859375,0.0192413330078125,0.002529144287109375,-0.035247802734375,-0.01102447509765625,-0.00859832763671875,0.0097808837890625,0.01195526123046875,-0.0340576171875,0.00457000732421875,-0.0145111083984375,-0.0037364959716796875,0.026275634765625,0.00994110107421875,0.039215087890625,-0.003032684326171875,-0.04705810546875,0.0257415771484375,0.0258636474609375,-0.03936767578125,0.0222320556640625,-0.029754638671875,-0.005214691162109375,-0.01494598388671875,-0.006988525390625,0.04498291015625,0.039398193359375,-0.0111236572265625,0.031341552734375,0.0013227462768554688,0.0183258056640625,-0.026824951171875,-0.009918212890625,0.0311126708984375,-0.00304412841796875,0.006534576416015625,-0.0260162353515625,0.0148468017578125,-0.0150299072265625,0.036407470703125,-0.014923095703125,-0.0078125,-0.00927734375,-0.0005064010620117188,-0.03228759765625,0.0032787322998046875,0.0780029296875,-0.01143646240234375,-0.01467132568359375,-0.0122222900390625,-0.05084228515625,0.004970550537109375,-0.0212249755859375,-0.0006957054138183594,0.0039825439453125,-0.0648193359375,0.0163421630859375,-0.02606201171875,0.0195465087890625,0.006031036376953125,-0.0291900634765625,-0.033233642578125,-0.0277252197265625,-0.0162200927734375,0.02001953125,-0.017730712890625,0.00971221923828125,-0.005046844482421875,-0.04058837890625,-0.037200927734375,0.0280609130859375,-0.01434326171875,-0.004337310791015625,0.00988006591796875,0.017913818359375,0.0202178955078125,-0.0084991455078125,0.006206512451171875,-0.025238037109375,-0.0081939697265625,-0.00970458984375,-0.05401611328125,-0.0160980224609375,-0.015655517578125,-0.0010061264038085938,-0.048004150390625,0.048553466796875,0.024139404296875,-0.0135040283203125,-0.022705078125,0.004093170166015625,-0.01233673095703125,0.031402587890625,0.0170745849609375,-0.057403564453125,0.023101806640625,0.001491546630859375,0.0175018310546875,0.00571441650390625,0.011810302734375,-0.010955810546875,-0.0374755859375,0.032623291015625,0.00948333740234375,0.0180511474609375,0.053924560546875,0.043914794921875,0.02386474609375,-0.022247314453125,-0.03350830078125,-0.027313232421875,0.047088623046875,0.0081939697265625,-0.0023708343505859375,-0.0108642578125,-0.03424072265625,-0.01409912109375,-0.005001068115234375,-0.037017822265625,0.0203094482421875,0.02777099609375,0.0030918121337890625,-0.04925537109375,0.046417236328125,0.044464111328125,-0.038360595703125,0.0374755859375,0.037750244140625,0.00323486328125,-0.028228759765625,0.021270751953125,-0.0325927734375,0.01153564453125,0.046295166015625,0.02813720703125,-0.015716552734375,-0.012298583984375,0.027313232421875,0.029937744140625,0.062255859375,-0.027679443359375,-0.03546142578125,0.0167388916015625,-0.0673828125,0.035614013671875,0.035064697265625,-0.007781982421875,-0.022125244140625,-0.0233612060546875,-0.038909912109375,0.0251922607421875,0.037933349609375,-0.0031986236572265625,-0.01509857177734375,-0.00345611572265625,-0.08935546875,0.007495880126953125,-0.012481689453125,0.06427001953125,-0.01187896728515625,-0.0225067138671875,0.020263671875,-0.063720703125,-0.020111083984375,0.01776123046875,0.05877685546875,-0.028656005859375,0.002811431884765625,-0.0197601318359375,-0.0772705078125,-0.0027637481689453125,-0.0172576904296875,0.019378662109375,-0.004077911376953125,0.040985107421875,0.027191162109375,-0.05010986328125,0.042449951171875,0.013427734375,-0.07135009765625,-0.01236724853515625,0.008453369140625,-0.0305633544921875,-0.027587890625,-0.0217742919921875,-0.0178985595703125,0.03985595703125,0.0289764404296875,0.005565643310546875,0.0199737548828125,0.00445556640625,0.0007052421569824219,0.001312255859375,-0.017669677734375,-0.003078460693359375,0.01202392578125,-0.00894927978515625,-0.055908203125,-0.021514892578125,-0.0689697265625,-0.006595611572265625,-0.01178741455078125,0.026336669921875,-0.04254150390625,-0.01499176025390625,0.02337646484375,-0.0322265625,0.023590087890625,0.04345703125,-0.0006170272827148438,-0.0469970703125,-0.01100921630859375,-0.00994873046875,0.0303802490234375,-0.0184783935546875,-0.004550933837890625,-0.061767578125,0.0180816650390625,0.005290985107421875,0.00893402099609375,-0.049530029296875,-0.0086517333984375,0.058135986328125,-0.062042236328125,0.001941680908203125,0.03070068359375,-0.04266357421875,0.004886627197265625,0.029022216796875,-0.0300140380859375,-0.03863525390625,0.009735107421875,-0.040802001953125,-0.0290069580078125,0.01837158203125,-0.040679931640625,-0.032958984375,0.00769805908203125,0.0008382797241210938,0.015960693359375,0.012176513671875,0.004291534423828125,0.01041412353515625,-0.007183074951171875,-0.0096435546875,0.0031185150146484375,0.0240325927734375,-0.0142822265625,0.01104736328125,0.0017499923706054688,0.032135009765625,-0.0214996337890625,-0.01169586181640625,-0.0002791881561279297,0.0011739730834960938,-0.00647735595703125,-0.0036907196044921875,0.008636474609375,0.047882080078125,-0.024993896484375,-0.053314208984375,0.0087432861328125,-0.0176239013671875,0.03570556640625,0.018768310546875,-0.007411956787109375,-0.01763916015625,-0.05322265625,-0.0019855499267578125,-0.00243377685546875,-0.0253753662109375,-0.01806640625,-0.005443572998046875,0.00572967529296875,-0.039947509765625,0.026641845703125,0.056365966796875,-0.02069091796875,0.0035686492919921875,-0.00440216064453125,-0.0178680419921875,-0.0231475830078125,-0.01004791259765625,-0.0010738372802734375,-0.00363922119140625,0.0042572021484375,-0.061431884765625,0.0016565322875976562,-0.0269927978515625,-0.0034732818603515625,0.0487060546875,0.0269622802734375,-0.017486572265625,0.0210418701171875,-0.00524139404296875,-0.06134033203125,-0.001865386962890625,-0.046600341796875,0.0457763671875,0.0092010498046875,0.021942138671875,0.00908660888671875,-0.0028839111328125,-0.01399993896484375,-0.032867431640625,0.042816162109375,0.007297515869140625,-0.00039124488830566406,0.0164794921875,-0.023590087890625,-0.048614501953125,0.016571044921875,0.0197601318359375,-0.03802490234375,-0.01128387451171875,-0.0171661376953125,-0.03729248046875,-0.010162353515625,0.015289306640625,0.01031494140625,0.01480865478515625,0.0256805419921875,0.002429962158203125,-0.031890869140625,-0.007289886474609375,-0.0132598876953125,0.007801055908203125,0.0011816024780273438,0.0142364501953125,0.0014705657958984375,0.01325225830078125,-0.0039005279541015625,0.0684814453125,-0.0007872581481933594,-0.0211334228515625,0.006374359130859375,0.0022563934326171875,0.0173492431640625,-0.00560760498046875,0.0095062255859375,-0.010833740234375,0.0179443359375,-0.00592803955078125,-0.0081329345703125,0.0254669189453125,-0.006641387939453125,0.035247802734375,-0.01361846923828125,0.006725311279296875,0.0109100341796875,-0.0007429122924804688,0.00215911865234375,0.0289306640625,-0.0082550048828125,0.0269012451171875,-0.00823974609375,-0.042694091796875,-0.036285400390625,0.01554107666015625,-0.0037860870361328125,0.00644683837890625,-0.0234375,0.05584716796875,0.0013322830200195312,0.0157928466796875,-0.0287933349609375,0.0114898681640625,-0.0458984375,-0.044036865234375,-0.0085906982421875,0.01232147216796875,-0.022857666015625,0.00235748291015625,-0.0794677734375,-0.001373291015625,0.007656097412109375,0.01079559326171875,0.0120391845703125,-0.0029430389404296875,-0.004047393798828125,0.04205322265625,-0.0012998580932617188,0.03692626953125,-0.0180206298828125,-0.01220703125,-0.0064544677734375,0.0117034912109375,0.0091400146484375,0.05267333984375,0.01416778564453125,-0.00640106201171875,0.01302337646484375,0.01025390625,0.0192108154296875,0.07452392578125,-0.0003311634063720703,0.0122222900390625,0.007610321044921875,0.00804901123046875,-0.0015878677368164062,-0.0219268798828125,0.00513458251953125,-0.03131103515625,0.019683837890625,0.021240234375,-0.0276947021484375,-0.01239013671875,0.0009975433349609375,0.005855560302734375,-0.027008056640625,-0.0095977783203125,-0.04754638671875,-0.01206207275390625,-0.0193328857421875,-0.0123138427734375,-0.06005859375,-0.008575439453125,0.00647735595703125,0.00750732421875,0.0253753662109375,0.016204833984375,0.0017681121826171875,0.0386962890625,-0.030487060546875,0.02191162109375,0.00420379638671875,0.02545166015625,-0.0020999908447265625,-0.0005393028259277344,-0.06378173828125,-0.00200653076171875,-0.045013427734375,-0.0523681640625,-0.0070953369140625,-0.03497314453125,0.0030956268310546875,0.0305633544921875,0.0194549560546875,0.03387451171875,0.036376953125,0.0281982421875,-0.0032806396484375,-0.028839111328125,0.006931304931640625,0.0114593505859375,0.0189971923828125,0.005062103271484375,-0.0027217864990234375,-0.0168914794921875,0.00946044921875,-0.0235748291015625,0.03131103515625,0.0221710205078125,-0.001983642578125,-0.01103973388671875,0.0123443603515625,0.0325927734375,-0.01338958740234375,-0.0151519775390625,0.0019397735595703125,0.0252838134765625,-0.0009627342224121094,0.0302581787109375,0.0162811279296875,0.012847900390625,0.0259552001953125,0.0225677490234375,0.0013437271118164062,-0.0220184326171875,-0.0020599365234375,0.006839752197265625,-0.0175628662109375,0.016326904296875,-0.00724029541015625,-0.00418853759765625,-0.00925445556640625,-0.008880615234375,-0.042724609375,0.03314208984375,-0.036376953125,-0.018463134765625,-0.0198822021484375,0.004680633544921875,0.0214385986328125,-0.0232086181640625,-0.07061767578125,-0.01450347900390625,0.02569580078125,-0.01288604736328125,0.005825042724609375,0.03033447265625,0.01297760009765625,-0.03973388671875,0.0560302734375,-0.016571044921875,0.0208587646484375,0.006500244140625,0.006694793701171875,-0.05291748046875,-0.0082244873046875,0.0056304931640625,0.0276947021484375,-0.00487518310546875,-0.050079345703125,-0.0023651123046875,-0.003696441650390625,-0.0030002593994140625,-0.0328369140625,0.0111083984375,0.0097198486328125,0.0093231201171875,0.00838470458984375,0.010101318359375,0.000423431396484375,-0.0013599395751953125,-0.006839752197265625,0.01103973388671875,-0.003559112548828125,-0.047149658203125,-0.0430908203125,0.0084228515625,0.013031005859375,0.02117919921875,-0.004261016845703125,0.0181732177734375,-0.0169677734375,-0.035064697265625,-0.0088348388671875,-0.0174560546875,-0.005184173583984375,0.0233917236328125,-0.021331787109375,-0.0355224609375,-0.02044677734375,-0.01012420654296875,0.035369873046875,-0.0272674560546875,-0.0037021636962890625,0.0252685546875,0.030609130859375,0.01430511474609375,0.01531219482421875,-0.01073455810546875,-0.0026683807373046875,-0.027740478515625,0.01114654541015625,0.004116058349609375,-0.0104827880859375,0.0013093948364257812,-0.0030975341796875,-0.005462646484375,0.0007910728454589844,-0.01171112060546875,0.047607421875,0.039581298828125,0.026611328125,0.0146026611328125,0.0223541259765625,0.0105743408203125,-0.005916595458984375,0.007732391357421875,0.06610107421875,0.00920867919921875,-0.0479736328125,-0.01629638671875,0.00396728515625,-0.01373291015625,-0.0007166862487792969,0.0248565673828125,0.0170440673828125,0.03173828125,-0.00009369850158691406,-0.0225677490234375,0.00374603271484375,-0.01050567626953125,-0.01910400390625,0.014251708984375,-0.004833221435546875,0.0245513916015625,0.01947021484375,0.0206146240234375,0.005245208740234375,-0.00482940673828125,0.0240478515625,0.0164031982421875,-0.0254974365234375,0.0296173095703125,-0.004703521728515625,-0.0242767333984375,-0.0210113525390625,-0.009735107421875,-0.00621795654296875,0.039031982421875,0.07489013671875,-0.01222991943359375,-0.00820159912109375,0.0007944107055664062,0.02459716796875,0.0286102294921875,0.01187896728515625,-0.0029811859130859375,0.022247314453125,0.0243682861328125,-0.0094146728515625,0.0013551712036132812,-0.0194549560546875,0.0015964508056640625,0.0281829833984375,0.0205841064453125,0.002002716064453125,-0.0146636962890625,0.01861572265625,0.063720703125,0.0168304443359375,0.0091552734375,0.01178741455078125,-0.01165008544921875,0.007793426513671875,-0.0095062255859375,0.048370361328125,0.016632080078125,0.00762176513671875,0.010955810546875,0.058929443359375,-0.030609130859375,-0.00751495361328125,-0.0195159912109375,0.00940704345703125,-0.00971221923828125,0.007411956787109375,-0.034027099609375,-0.0002428293228149414,0.016082763671875,-0.00453948974609375,0.026153564453125,0.033294677734375,0.0098724365234375,-0.0185089111328125,0.035430908203125,-0.00949859619140625,-0.02545166015625,0.0145721435546875,-0.0295257568359375,0.0113983154296875,0.0011157989501953125,-0.008636474609375,-0.00351715087890625,0.023406982421875,0.0014390945434570312,-0.0121612548828125,0.0008625984191894531,0.032928466796875,0.049102783203125,0.002902984619140625,-0.01340484619140625,0.04644775390625,0.0118865966796875,0.0311279296875,0.033447265625,-0.028289794921875,-0.020477294921875,-0.05126953125,-0.0286102294921875,-0.0147857666015625,0.01328277587890625,0.019927978515625,-0.003574371337890625,0.01404571533203125,-0.0018644332885742188,-0.00836944580078125,0.0019969940185546875,0.0262298583984375,-0.005245208740234375,0.019622802734375,0.021636962890625,0.0229339599609375,-0.0204620361328125,-0.0272216796875,0.0172576904296875,-0.00998687744140625,0.01265716552734375,-0.0025081634521484375,0.038116455078125,-0.0203704833984375,0.021331787109375,0.002094268798828125,-0.0024509429931640625,0.01507568359375,-0.003787994384765625,0.0447998046875,-0.019287109375,-0.0218048095703125,-0.019378662109375,0.00743865966796875,-0.01514434814453125,-0.02569580078125,0.0130767822265625,0.00807952880859375,0.042572021484375,-0.0308380126953125,0.02325439453125,-0.0484619140625,-0.00801849365234375,0.024627685546875,0.0033016204833984375,-0.0280609130859375,-0.01459503173828125,-0.006557464599609375,-0.0005574226379394531,-0.023895263671875,0.0110931396484375,0.01137542724609375,0.0136871337890625,0.008697509765625,-0.00855255126953125,0.0247802734375,-0.0085601806640625,0.01690673828125,-0.0304718017578125,0.017578125,0.033416748046875,0.031524658203125,0.032562255859375,0.0162200927734375,-0.024810791015625,0.014923095703125,-0.04156494140625,0.01238250732421875,-0.009857177734375,0.0283355712890625,-0.005931854248046875,-0.0229644775390625,0.019775390625,0.057403564453125,0.0095977783203125,0.032379150390625,0.0025482177734375,0.02850341796875,-0.01093292236328125,-0.00035452842712402344,-0.0192108154296875,0.00391387939453125,0.01015472412109375,0.0195159912109375,0.003765106201171875,0.0012607574462890625,-0.01361083984375,-0.001796722412109375,-0.03277587890625,-0.02496337890625,0.004314422607421875,-0.0166473388671875,0.04217529296875,0.0264739990234375,-0.0144805908203125,0.0051116943359375,0.0009813308715820312,0.00995635986328125,-0.0343017578125,-0.0043487548828125,0.006557464599609375,0.009765625,0.007770538330078125,-0.0105133056640625,-0.0040283203125,-0.0074005126953125,0.00867462158203125,-0.0255889892578125,-0.034698486328125,0.0153961181640625,-0.0010814666748046875,0.00601959228515625,0.029052734375,-0.036529541015625,0.0177764892578125,0.00562286376953125,-0.00913238525390625,0.0204010009765625,-0.036041259765625,-0.037750244140625,-0.0213623046875,-0.016204833984375,0.01250457763671875,0.0038318634033203125,0.010772705078125,0.01537322998046875,-0.0293426513671875,0.0177154541015625,0.00199127197265625,0.035186767578125,-0.0156707763671875,-0.007720947265625,0.0237579345703125,-0.0197906494140625,0.0030155181884765625,-0.00911712646484375,0.0076904296875,-0.037841796875,-0.0202178955078125,-0.01702880859375,0.052764892578125,0.00978851318359375,-0.01200103759765625,-0.03369140625,0.0252227783203125,0.01395416259765625,-0.00511932373046875,-0.047637939453125,-0.033538818359375,-0.0196990966796875,0.004383087158203125,-0.00032019615173339844,-0.020660400390625,-0.02178955078125,0.003940582275390625,0.01259613037109375,-0.0127105712890625,0.02197265625,-0.0133056640625,0.0112457275390625,-0.040191650390625,-0.001617431640625,-0.01471710205078125,-0.0010042190551757812,0.0036334991455078125,0.005954742431640625,-0.036834716796875,0.02239990234375,-0.0187225341796875,-0.003871917724609375,0.034759521484375,0.0298004150390625,0.00206756591796875,-0.032073974609375,0.0020084381103515625,-0.00330352783203125,-0.017242431640625,0.00499725341796875,0.00269317626953125,-0.0296630859375,0.017852783203125,0.0015306472778320312,0.016387939453125,0.0185699462890625,-0.0038890838623046875,-0.0008053779602050781,0.0188446044921875,-0.0086822509765625,0.0155792236328125,-0.007450103759765625,-0.01397705078125,0.02362060546875,-0.01995849609375,-0.012359619140625,-0.042449951171875,0.01117706298828125,-0.011474609375,0.00726318359375,0.024871826171875,0.0265960693359375,0.005199432373046875,0.0243072509765625,-0.0247650146484375,-0.0110931396484375,-0.015777587890625,-0.052825927734375,-0.00222015380859375,-0.0208740234375,0.004413604736328125,-0.0408935546875,-0.00281524658203125,-0.01209259033203125,-0.0020771026611328125,0.0287017822265625,-0.005954742431640625,-0.0131683349609375,0.0153045654296875,-0.031982421875,-0.0010843276977539062,-0.0038623809814453125,-0.0035686492919921875,-0.058380126953125,-0.007564544677734375,0.0047760009765625,-0.0277862548828125,-0.000858306884765625,-0.00209808349609375,0.005695343017578125,-0.035125732421875,-0.00391387939453125,-0.0107574462890625,-0.00457000732421875,-0.013214111328125,-0.0045928955078125,0.0045928955078125,-0.0230255126953125,-0.017578125,-0.011688232421875,-0.008331298828125,0.05072021484375,-0.03314208984375,-0.0038909912109375,0.041015625,0.00473785400390625,0.00479888916015625,0.00626373291015625,-0.01454925537109375,0.008514404296875,-0.0162506103515625,-0.018218994140625,0.00527191162109375,0.0113067626953125,0.048828125,0.006420135498046875,0.002613067626953125,0.003170013427734375,-0.03521728515625,0.004436492919921875,0.0125732421875,0.024993896484375,0.0268707275390625,0.01528167724609375,-0.00756072998046875,-0.0457763671875,0.004055023193359375,-0.0166168212890625,0.044525146484375,-0.037139892578125,0.000797271728515625,-0.019927978515625,0.0260009765625,-0.0058746337890625,-0.03033447265625,-0.0006875991821289062,0.01070404052734375,0.0203399658203125,-0.01079559326171875,-0.0011949539184570312,-0.00981903076171875,-0.0007381439208984375,-0.00841522216796875,-0.006923675537109375,0.031494140625,-0.044952392578125,0.0274658203125,-0.0157928466796875,0.0135650634765625,-0.03460693359375,0.0182647705078125,-0.031402587890625,0.0132598876953125,-0.004207611083984375,0.0195770263671875,0.0171051025390625,-0.005550384521484375,-0.0207977294921875,-0.00823211669921875,-0.0198974609375,0.009124755859375,-0.00849151611328125,0.017364501953125,0.00963592529296875,0.028778076171875,-0.0257720947265625,-0.01708984375,0.0213470458984375,0.009918212890625,0.00849151611328125,0.020843505859375,-0.0311279296875,-0.02423095703125,-0.04974365234375,-0.01366424560546875,0.011505126953125,0.0149688720703125,0.0064544677734375,0.03765869140625,0.0013151168823242188,-0.01035308837890625,0.0020751953125,0.03631591796875,-0.0024700164794921875,-0.0240020751953125,-0.052215576171875,-0.007541656494140625,0.00144195556640625,0.0004756450653076172,0.026947021484375,-0.0184173583984375,-0.05828857421875,-0.0234527587890625,0.00189971923828125,0.0134735107421875,0.03369140625,0.0006785392761230469,0.022979736328125,-0.0175018310546875,-0.016754150390625,-0.0038166046142578125,-0.006748199462890625,0.045318603515625,0.004222869873046875,-0.01416778564453125,0.017242431640625,0.00977325439453125,-0.007244110107421875,0.006252288818359375,0.0206298828125,-0.01019287109375,-0.02099609375,0.0004646778106689453,0.0408935546875,0.00103759765625,-0.034454345703125,0.008880615234375,-0.006465911865234375,0.0207672119140625,-0.0003342628479003906,0.0178070068359375,-0.019622802734375,-0.0009312629699707031,0.0007109642028808594,0.004489898681640625,-0.033416748046875,-0.0279083251953125,0.0211029052734375,-0.06744384765625,0.003391265869140625,-0.0031490325927734375,-0.01436614990234375,0.0040740966796875,0.025604248046875,0.007198333740234375,-0.021453857421875,-0.005458831787109375,-0.00569915771484375,-0.021087646484375,-0.0069427490234375,-0.0026149749755859375,0.0015392303466796875,0.0053558349609375,0.0139312744140625,0.006603240966796875,0.0037174224853515625,-0.0224609375,-0.01435089111328125,-0.0005178451538085938,0.007160186767578125,-0.0195465087890625,-0.0021915435791015625,0.0209197998046875,-0.007049560546875,-0.0093231201171875,-0.0084228515625,-0.0210418701171875,-0.0034942626953125,-0.016815185546875,-0.0187835693359375,0.029876708984375,0.0194091796875,0.00138092041015625,-0.03515625,-0.0136566162109375,-0.01052093505859375,0.0127105712890625,-0.0007467269897460938,-0.0167999267578125,0.01473236083984375,0.00972747802734375,0.015472412109375,-0.000354766845703125,-0.0129547119140625,0.014007568359375,0.00839996337890625,-0.007656097412109375,-0.011138916015625,-0.01541900634765625,0.035491943359375,-0.0048675537109375,0.006305694580078125,0.0288238525390625,-0.0028934478759765625,0.029296875,0.006122589111328125,0.02142333984375,-0.0012063980102539062,0.03515625,0.006168365478515625,-0.01259613037109375,0.0239410400390625,0.01373291015625,-0.0130767822265625,-0.0227508544921875,0.01568603515625,-0.00986480712890625,-0.037322998046875,-0.00994110107421875,0.040771484375,-0.024139404296875,0.029144287109375,-0.0027408599853515625,0.0033817291259765625,0.004474639892578125,-0.01352691650390625,-0.0014390945434570312,-0.0220489501953125,0.015106201171875,-0.0005464553833007812,-0.0030498504638671875,0.0243988037109375,-0.01119232177734375,-0.026519775390625,0.00412750244140625,0.0167083740234375,-0.042999267578125,-0.01287078857421875,-0.015472412109375,0.00528717041015625,-0.0281982421875,0.00885772705078125,-0.0389404296875,0.02642822265625,-0.0274658203125,-0.005794525146484375,0.0165252685546875,-0.023468017578125,-0.00818634033203125,"019e6427-f3df-74c9-9e65-0b50b84945af","https:\u002F\u002Fapi.certificates.dev\u002Fstorage\u002FeqTds0V3Lv63Yik8OKwIZdsktP4ZcsNNoRXiyLPF.png",true,false,"2026-05-26T06:00:00.000Z","closures-explained-how-functions-remember-their-scope","019d9eed-d835-729a-a029-7e6320cb67ed","Certificates.dev","certificatesdev","https:\u002F\u002Fcertificates.dev\u002Fblog","This article explains the concept of closures in JavaScript, detailing how functions retain access to their lexical scope even after that scope has finished executing. It also addresses common issues like the loop bug and provides practical examples of using closures.","Closures Explained: How Functions Remember Their Scope","2026-05-29T07:59:49.312Z","https:\u002F\u002Fcertificates.dev\u002Fblog\u002Fclosures-explained-how-functions-remember-their-scope?friend=MOKKAPPS",{"clickCount":1419,"viewCount":1420},0,10,[],[]]