Jquery assistance

thats exactly what i need to make it work YAY, i tried doing == true after it but it wasnt working but that works, just one more thing i want it to do then it shall be alive haha

After you get yours working, take a look at this as another way of doing the same thing

i cant get yours to output the results

how can i link my code pen cause thats where im doing it

https://codepen.io/canapacoder/pen/gRzGKW

mine wont show the output here either

whats the question mark doing in this (boxes.length === 0)?
you made it look too easy haha

The embedded versions donā€™t like alerts, might be a security issue.

Thatā€™s called a ternary operator, itā€™s basically a shorter if/else. The part in the parens is your test, the ? separates the test from the results. I use it when doing very basic assignments that fit on one line.
example:

const someVariable = (thisIsTrue === true)? "truthy result" : "falsy result"; 

nice alright thanks ill have to remember that

im such a noob your little program literally is half the lines of code as mine haha

It takes time. You learn little bits here and there and you figure out how to refactor your code. I didnā€™t end up here overnight and thereā€™s still a bunch of ways that code can be improved. Just keep plugging away and try things out and look for better ways to do them over and over. Good luck.

show me the best way it could be done :slight_smile: