Use an string item state as a name and state for another item

Read the design pattern:

It is quite clever stuff
Don’t copy and paste the code.
Write it, yourself line by line, best way to learn
Try to understand the code, bit by bit, what it does and why

That’s how I started back in 80’s copying code from book
Making mistakes and learning that way

Maybe read a dummy guide of programming and understand the differences in types, variables, core functions and statements

Good luck!

2 Likes