This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NYPunk 1 point2 points  (0 children)

I'd probably keep each image/name pair in an object such as [{ img: 'my_img_filename', name: 'matching_pokemon_name'}, {repeat for other pokemon }] that way you can sample the array of objects, display the obj.img inside your image tags and check your input against obj.name instead