Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CoffeeScript creates a string from an array


May 09, 2021 CoffeeScript


Table of contents


A string is created by an array

Problem

You want to create a string from an array.

Solution

ToString(): using JavaScript's array method:

["one", "two", "three"].toString()
# => 'one,two,three'

Discuss

ToString() is a standard JavaScript method. Don't forget the parenthesis.