I had to work on a simple problem this week and thought it could be a good idea for a mini challenge.
Here's the gist of it:
users should be able to select as many cities as they like from a drop down as long as they're not located in more than 2 countries.
I should not be able to select any city in Spain as it would result in 3 countries.
Feel free to change anything that could make your life and code easier.
Our project uses bootstrap-select so you need to implement your solution with that plugin.
Here's a Codepen template for you to play with (I used the same to implement my solution):
I'll post a follow-up later to explain my solution and get feedback too.
I'm looking forward to your entries. 🔥