“Standard JavaScript” Code-Antworten

.Default in JavaScript

function multiply(a, b) {
  b = (typeof b !== 'undefined') ?  b : 1
  return a * b
}

multiply(5, 2)  // 10
multiply(5)     // 5
Smoggy Spider

Standard JavaScript

function say(message='Hi') {
    console.log(message);
}

say(); // 'Hi'
say('Hello') // 'Hello'
Better Bison

Ähnliche Antworten wie “Standard JavaScript”

Fragen ähnlich wie “Standard JavaScript”

Weitere verwandte Antworten zu “Standard JavaScript” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen