Uhh? Unfindable code error

Hi!
I’m having a problem with the code below. After clicking the Img labeled “blue miss” three times in a row, I should be able to see a free throw screen pop up. It’s not working (obviously). It’s just not popping up. My code is attached below.

https://replit.com/@okeller2/Trash-Can-Basketball

Hello @owenmkeller5 and welcome to the community!

Looking at your code there is some problems. The first one being that you have both a function and a variable named bluemiss. Javascript will get confused about what to do between variable and function. Another thing is that sometime you use bluemiss and other times you use blueMiss, but you have to remember that JS is case-sensitive so try to maintain a consistent in your code.

One last thing is about your setTimeout, you want to invoke the function immediately?

2 Likes

Yeah, I can’t figure out how to just call the function, so I just used setTimeout with a millisecond value of 0.

Thanks for the feedback, I will try this.

functions can be called like so:

func example() {
    console.log("test")
}

example()