(Game Lab - Code.org)
During the process of coding their games, they started getting an error message, “Background is not a function”. However, it does not happen to all students, even when using the same code. This causes their games not to run.
I have tried changing up the code for the background, refreshing the page, deleting just the background block and readding it, and rewriting the whole program. Eventually it leads to the same issue for only some students.
Actually, I think I found your problem. On line 10, she has renamed “background” to be a sprite. The word background is a reserved word that is already used by javascript to refer to the background block. On line 10, by renaming background to be a sprite, it causes a conflict that is most likely why the error is occurring.
Have her use a different name like bg or bckgrnd or something like that and it should solve the issue.