transform array to string code example
Example 1: transform array to string js
const myArray = [1, 2, 3, 4, 5, 6];
console.log(a.join('/'));
const myArray = ['g', 'o', 'o', 'g', 'l', 'e'];
console.log(a.join(''));
const array1 = [1, 2, 'a', '1a'];
console.log(array1.toString());
Example 2: array to string java
char[] charArray = new char[] {'b','u','z','z'};
String answer = new String(charArray);
Example 3: turn array into string
const elements = ['Fire', 'Air', 'Water'];
console.log(elements.join());
console.log(elements.join(''));
console.log(elements.join('-'));