我的Eclipse正在继续崩溃一个正在运行的循环,说重新索引存储库[myusername]我认为这是因为github但是我已经取消选中可能导致Maven和GitHub下的eclipse偏好问题的所有内容.有人可以帮忙,我的电脑一直在升温和崩溃.谢谢
这是来自JavaScript闭包如何工作?.第一个答案对我来说没有任何意义,我无法评论它.这非常令人沮丧
function foo(x) {
var tmp = 3;
return function(y) {
alert(x + y + (++tmp));
}
}
var bar = foo(2); // bar is now a reference to the closure returned by foo
bar(10);
Run Code Online (Sandbox Code Playgroud)
这是什么意思?y变量来自哪里?
这是我的代码:
initHomeFeed: function(options) {
$.get('/feed_items', {}, function(data) {
console.log("Y U NO COME HERE")
console.log("hello");
Feed.feed_items_html = data.feed_items_html_array;
Feed.pseudo_feed_items_html = data.pseudo_feed_items_html_array
console.log(ordered_arr);
}, "json");
console.log("makehtml was called by inithomefeed")
Feed.makeHomeHTML();
Run Code Online (Sandbox Code Playgroud)
"makehtml被inithomefeed调用"打印到控制台,makeHomeHTML函数内的控制台日志也是如此.但是,get函数中没有显示任何控制台日志.我怎么能这样做它不会跳过get函数?