I really recommend that you guys learn how to use
Version Control.
I, personally, like to use
Git. I also recommend you to read all about git, because as a first experience it can be a bit tricky. In addition, you can either use Git through command line (on Linux or Windows using
Git-Bash) or even use any nice GUI for Git (in this case I recommend
GitKraken).
To finish this non-ending link post, I also recommend you to use
GitHub (for open source projects) and
GitLab (for private projects) as repositories.
Explaining a bit why not using Dropbox or any other workaround: Coding and working with code almost always leads to code collisions, which is, you and your friend may edit the same script or object and Dropbox or any other "sharing program" will not try to avoid collisions in any case. Therefore, you do need to ensure code consistency and changes. Version Control also updates only the changes that happened, lowing the data transferred.
I really hope I have given you the right track with all this links and information. This will probably be useful forever for you when programming any other thing