JSFiddle - React, Tailwind, and code Playground

by nevkatz

JavaScript

function foo(a, b='default') {


  
  return a+'-'+b;
  
}

let arr = ['n','e','v'];

let x = arr.map(x=> foo(x));

console.log(x);