displaying a string in an object

I'm trying to display the contents of 'name' in this Object through a function;

Locations[1]= {name: "Castle", characters: [], maxCharacters: 8};
Code:
var swapActorLocation = function(actorId, locationId) {   if (locationId == 1 && Locations[1].maxCharacters == Locations[1].characters.length) {       console.log("Party 1 is full.")   } else {     $dataActors[actorId.location] = locationId;     console.log("Success,", + actorId + " moved to", + Locations[locationId].name);   }}
When I run this with parameters (1,1), I get; "Success, 1 moved to NaN". I tried changing '.name', with '.maxCharacters' just as a test, and it worked fine. 

I tried adding .toString() to the end of .name, but it didn't work either. 

Any insight to what I'm doing wrong would be greatly appreciated. 
What is : actorId.ocation do you mean location?
What is : actorId.ocation do you mean location?
Yes, my mistake. That was just a typo from me typing this out at school.
Remove the commas.

console.log("Success,", + actorId + " moved to", + Locations[locationId].name);This will try to log 3 strings, converting "actorId" and "Locations[locationId].name" to numbers because of the plus sign in front of them. NaN is a special value JavaScript uses, when a given object can't be converted to a number.This should work:

Code:
console.log("Success," + actorId + " moved to" + Locations[locationId].name);
Remove the commas.

console.log("Success,", + actorId + " moved to", + Locations[locationId].name);This will try to log 3 strings, converting "actorId" and "Locations[locationId].name" to numbers because of the plus sign in front of them. NaN is a special value JavaScript uses, when a given object can't be converted to a number.This should work:

console.log("Success," + actorId + " moved to" + Locations[locationId].name);
Ahh, I knew it must be something simple. Thank you very much! 

Original thread: https://forums.rpgmakerweb.com/threads/displaying-a-string-in-an-object.49025/