22 lines
338 B
Plaintext
22 lines
338 B
Plaintext
/* Nested function, in Jsish */
|
|
function makeList(separator) {
|
|
var counter = 1;
|
|
|
|
function makeItem(item) {
|
|
return counter++ + separator + item + "\n";
|
|
}
|
|
|
|
return makeItem("first") + makeItem("second") + makeItem("third");
|
|
}
|
|
|
|
;makeList('. ');
|
|
|
|
/*
|
|
=!EXPECTSTART!=
|
|
makeList('. ') ==> 1. first
|
|
2. second
|
|
3. third
|
|
|
|
=!EXPECTEND!=
|
|
*/
|