Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.22.1/ramda.min.js"></script>
</body>
</html>
 
const products = ['teeshirt', 'sweater']
const options = ['large', 'medium', 'small']
const colors = ['red', 'black']
// let merchandise = []
// products.forEach(product => {
//   options.forEach(option => {
//     colors.forEach(color => {
//       return merchandise.push(`${product}- ${option}-${color}`)
//     })
//   })
// })
const buildMerch = product => option => color =>`${product}-${option}-${color}`
const merchandise = R.ap([buildMerch], [products, options, colors])
console.log(merchandise)
// console.log(combined())
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
amitepro
0viewers