Working on a project with lot of constraints : Improved my coding skills 3x. Project had time constraints and I had to constantly improvise. Subsequent projects I worked on became too easy.
Working with someone more experienced : You get new perspectives in solving old problems.
Working on variety of problems: Make a desktop app, dabble in web-frontend, write an api, make a game, make a mobile app, make a chatbot, make an IDE plugin and so on. You never know which skills will help you when..