mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
20 lines
451 B
JavaScript
20 lines
451 B
JavaScript
'use strict';
|
|
|
|
module.exports = function(builder) {
|
|
var templateRoot = builder.templateRoot;
|
|
var forEach = builder.forEach;
|
|
|
|
return templateRoot([
|
|
forEach({
|
|
varName: 'i',
|
|
from: 0,
|
|
to: 'myArray.length',
|
|
step: 2,
|
|
body: [
|
|
builder.functionCall('console.log', [
|
|
builder.identifier('i')
|
|
])
|
|
]
|
|
})
|
|
]);
|
|
}; |