Closed DigitalSkateboarder closed 3 years ago
the elf.ask_munch is never called for on Level 7. Read the task more closely. He's asking you to simply submit a function that performs the task and returning the value its looking for. For example:
// elf.ask_munch(0) is never used
elf.tell_munch(function(MUNCHSPASSEDOBJECT) {
// DO WHATEVER THE MUNCHKIN IS ASKING YOU TO DO
// to MUNCHSPASSEDOBJECT
return SOMEVALUEFROMMUNCHSPASSEDOBJECT
})
You could also abstract the function out and simply pass the function name. That should be whats in the example when you click on the munchkin for levels 7 and 8.
function ParseMunchData(MUNCH_PASSED_OBJ) {
// do the required task to MUNCH_PASSED_OBJ
return desired_value_from_MUNCH_PASSED_OBJ
}
// elf.ask_munch(0) is never used
elf.tell_munch(ParseMunchData)
In fact, if you click on the munchkin in the CURRENT LEVEL OBJECTS window, you'll see a similar example:
Hey, really appreciate you getting back so quick! Thank you.
Must be missing something - I did exactly as mentioned but it wasn't working. Did something in jsFiddle passing through that example array of arrays and it worked.
As the subject says, elf.ask_munch(0) brings back undefined on level 7