diff --git a/index.js b/index.js index 63d8355c1f..5cf355933f 100644 --- a/index.js +++ b/index.js @@ -1 +1,30 @@ // add solution here +function theBeatlesPlay( musicians, instruments) { +let arr = [] +for ( let i=0; i < musicians.length; i++ ) { + const str = musicians[ i ] + ' plays ' + instruments[ i ]; + arr.push( str ); +} +return arr; +} + +function johnLennonFacts(facts) { + const shoutedFacts = [] + let i = 0; + while (i < facts.length) { + shoutedFacts.push(`${facts[i]}!!!`) + i++ + } + return shoutedFacts; +} + +function iLoveTheBeatles(n) { + const arr = [] + + do { + arr.push('I love the Beatles!') + n++ + } while (n < 15) + + return arr +}