Skip to content

plxity/and-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

and-game

// Input
andGame(['idli', 'sambhar', 'chutney']);

// Output
idli, sambhar and chutney.


// Input - with second paramter true which will use '&' instead of 'and'
andGame(['idli', 'sambhar', 'chutney'], true);

// Output
idli, sambhar & chutney.

Parameters

  1. Array of elements.
  2. Boolean value if you wanna use '&' instead of 'and'. By default it is set to false.