Re: wip/new-model review
- From: Mattias Bengtsson <mattias jc bengtsson gmail com>
- To: ostree-list gnome org
- Subject: Re: wip/new-model review
- Date: Tue, 09 Jul 2013 16:51:05 +0200
On sön, 2013-07-07 at 11:26 -0400, Colin Walters wrote:
(I really wish JS had a better array iteration
syntax...)
There's Array.forEach but maybe you are afraid of too many closures?
There's also for ... of loops which works in gjs in JHBuild, but it has
the disadvantage of not being standardized yet.
let arr = [1,2,3,4,5];
log("arr.forEach(f):");
arr.forEach(function(e) {
log(e);
});
log("for e of arr:");
for(let e of arr) {
log(e);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]