I want to pass a global variable to a javascript .each function and keep its value while the iteration.
Here is the code.
var year = false;
page.posts.each(function(item, year){
year = true;
});
The year is still false. How can year keeps its value in the iteration?