re: Explain variables in programming like I'm five VIEW POST

TOP OF THREAD FULL DISCUSSION
re: This is a great question. Although Forest Hoffman nailed it, I'll still give it a shot. Think of a variable as a pizza box. Now, the box may conta...
 

That's a good way to explain it too. I think you could even extend this to talk about data types.

 

Thanks. That was the original intention. Wanted to also add the different types of boxes such as pizza box, cake box etc to show different data types. But then, I thought it would complicate the answer, so chickened out at the end. :D

Please do elaborate with the different boxes. Think it's helpful in visualizing how variables work. Plus you did an awesome job in illustrating with pizza. Pizza speaks dearly to my heart.

code of conduct - report abuse