On Event Click Function Error


This was posted a few years ago and there were no replies. Why and when does the word even show up here and create this error. It has not happened to me, but as I am grading I am seeing it in a lot of student work. What are they doing to make this happen.
Can someone chime in here please :slight_smile: thanks!

I have noticed that when you have the word “event” as a parameter, you get the warning. The code still works but the warning is there. Look at my screenshoot.

When you drag an onEvent block from the pallet it doesn’t include the parameter event. When you create the onEvent from design mode using the EVENTS tab it includes the parameter.

Javascript lets you include parameters that you don’t use. However, the syntax checker (I forget which one App Lab uses) finds that and warns you. There is a possibility you have misspelled a parameter name. The Javascript parser really doesn’t care because it is valid syntax.

It is cleaner to remove it if you don’t plan on using it.

1 Like