The Student Room Group

iDEA silver award Robotics

Having trouble with the idea maker 2 badge on the sound blocks, so far I have done this:

var soundblocks=[crash,happyBeep,whistle];
for(I=0;<soundBlocks.length;i++){
playsound(soundblocks);
}

it says to
"Loop through soundBlocks
call the playSound() function
Pass the correct sound from your sound array into it"
its case sensitive and your (I) needs to be lower caseJavaScript is always case sensitive so I'd check that if I were you πŸ˜ƒπŸ‘
Original post by hollyc0389
its case sensitive and your (I) needs to be lower caseJavaScript is always case sensitive so I'd check that if I were you πŸ˜ƒπŸ‘

Can you help me please? I've been stuck on this for 3 days and I can't get it to work
Attachment not found
Original post by Hannah_VMT
Can you help me please? I've been stuck on this for 3 days and I can't get it to work
Attachment not found

I managed to complete it, it took me a while
var soundBlocks = [crash,happyBeep,whistle];
for (i=0;i<soundBlocks.length;i++)
{
playSound(soundBlocks);
}

thats the correct answer, if when you have done you get to web design idea maker badge 3 and do it please let me know and give me a hand?
Original post by hollyc0389
I managed to complete it, it took me a while
var soundBlocks = [crash,happyBeep,whistle];
for (i=0;i<soundBlocks.length;i++)
{
playSound(soundBlocks);
}

thats the correct answer, if when you have done you get to web design idea maker badge 3 and do it please let me know and give me a hand?

thank you
It doesn’t work for me!
I am stuck on debugging the code for movement pls someone help
Reply 7
Original post by hollyc0389
I managed to complete it, it took me a while
var soundBlocks = [crash,happyBeep,whistle];
for (i=0;i<soundBlocks.length;i++)
{
playSound(soundBlocks);
}

thats the correct answer, if when you have done you get to web design idea maker badge 3 and do it please let me know and give me a hand?

so i tried to use this code and it didnt work so if possible can i recieve more help. this was my code:
var soundBlocks = [crash,happyBeep,whistle];
for (i=0;i<soundBlocks.length;i++){
playSound(soundBlocksi])
}
Reply 8
Original post by tian snipes
thank you

This is the correct answer
Reply 9
Original post by Fiona78
This is the correct answer

It might be but it isn't working when I typed in.

Quick Reply

Latest