forked from jsmapr1/simplifying-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfull.js
More file actions
28 lines (25 loc) · 682 Bytes
/
full.js
File metadata and controls
28 lines (25 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function getInstruments(band) {
// START:getInstruments
const instruments = [];
for (let i = 0; i < band.length; i++) {
const instrument = band[i].instrument; // <label id="instrument"/>
instruments.push(instrument); // <label id="push"/>
}
// END:getInstruments
return instruments;
}
// START:getInstrument
function getInstrument(member) {
return member.instrument;
}
// END:getInstrument
function getInstruments2(band) {
// START:getInstruments2
const instruments = [];
for (let i = 0; i < band.length; i++) {
instruments.push(getInstrument(band[i]));
}
// END:getInstruments2
return instruments;
}
export { getInstruments, getInstruments2 };