Skip to content

Latest commit

 

History

History

say-array

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Ingredients

say-array


What you will learn

If you have an array of items you want to say to the user, use this sayArray() function to format the list with commas and a connecting word before the final item.

For example, if your list has

var myRequest = ['apples','oranges','strawberries'];

You pass in two arguments: the list array, and the connecting word.

  • sayArray(myRequest, 'and') the store has apples, oranges, and strawberries
  • sayArray(myRequest, 'or') choose either apples, oranges, or strawberries

Instructions for deploying this sample skill


Back to the [Home Page](../../README.md#title)