The JavaScript method toString()
converts an array to a string of (comma separated) array values.
Syntax
array.toString()
Lets Starts
1.Create Array
var flowers = ["Lily", "Rose", "Lotus", "Jasmine"];
2.Use in Built toString()
Function
document.getElementById("demo").innerHTML = flowers.toString();
<!DOCTYPE html>
<html>
<head>
<title> Convert Arrays to Strings In JavaScript</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<br>
<br>
<div class="text-center">
<h1> Convert Arrays to Strings In JavaScript</h1>
</div>
<br>
<div class="well">
<h1 id="demo"></h1>
</div>
<br>
</div>
</body>
</html>
<script>
var flowers = ["Lily", "Rose", "Lotus", "Jasmine"];
document.getElementById("demo").innerHTML = flowers.toString();
</script>