The default display of an array contents is with ',' separators.
You can alter this display with a .join() as in the following example.
Code:
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<title> Untitled </title>
<script type="text/javascript">
var arrayPrincipal = [4, 2, 13, 0, 5];
var str = '';
str += arrayPrincipal+'\n\n'+arrayPrincipal.join(',')+'\n\n';
str += arrayPrincipal.join(' ')+'\n\n'+arrayPrincipal.join(', ');
alert(str);
</script>
</head>
<body>
</body>
</html>