JavaScript: What are default parameters?
Brandon Morelli
5786

its not work in old browsers :), try

function logFirst(num, data){
  num = num || 0;
data = data || ['cats'];
  console.log(`I own ${num} ${data[0]}.`);
}

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.