我有这个代码:
count = $content.find('.post').length;
for x in [1...count]
/*
prev_el_height += $("#content .post:nth-child(" + x + ")").height();
*/
prev_el_height += $content.find(".post:nth-child(" + x + ")").height();
我希望这会变成
for (x = 1; x < count; x++) { prev_el ... }
但它变成了这样:
for (x = 1; 1 <= count ? x < count : x > count; 1 <= count ? x++ : x--) {
有人可以解释为什么吗?
编辑:如何让我的预期语法输出?