You'll need to use the absolute path to the destination folder on the instance. For example
gcloud compute copy-files c:/localfile.js loggeduser@instance-name:/myAwesomeApp/src/main/webapp/resources/js --zone us-central-1
You can also use relative path to the loggeduser's home directory. Assuming the home directory is /home/loggeduser and the project is at the root directory, the command for the above example will be
gcloud compute copy-files c:/localfile.js loggeduser@instance-name:../../myAwesomeApp/src/main/webapp/resources/js --zone us-central-1
It's also important to make sure that 'loggeduser' has necessary permissions, otherwise you may receive 'permission denied' errors.