1var names = 'Harry,John,Clark,Peter,Rohn,Alice';
2var nameArr = names.split(',');
3console.log(nameArr);
4
5// Accessing individual values
6alert(nameArr[0]); // Outputs: Harry
7alert(nameArr[1]); // Outputs: John
8alert(nameArr[nameArr.length - 1]); // Outputs: Alice