Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

pass only second argument

function test(a = "ay", b = "bee") {
  console.log(`a = ${a}, b = ${b}`);
}
test();             // "a = ay, b = bee"
test(1);            // "a = 1, b = bee"
test(undefined, 2); // "a = ay, b = 2"
test(1, 2);         // "a = 1, b = 2"
Comment

PREVIOUS NEXT
Code Example
Javascript :: after end time run function 
Javascript :: file size to string js 
Javascript :: Expresion regular para validar nombres de usuario 
Javascript :: polygon intersection js 
Javascript :: nodejs stream pipeline 
Javascript :: docker for node , exoress and coackraz 
Javascript :: prevent alpine js from rendering components during refresh 
Javascript :: how to target a hidden html element by js 
Javascript :: the document has mutated since the result was returned 
Javascript :: javascript show alert if browser is not google chrome 
Javascript :: postgresql nodejs 
Javascript :: what are array methods in javascript 
Javascript :: disable input field javascript 
Javascript :: brightness javascript 
Javascript :: how to assign an rest operator in javascript 
Javascript :: string charat 
Javascript :: vuejs accessing props from data 
Javascript :: get id javascript 
Javascript :: click function in js 
Javascript :: get the last item in an array 
Javascript :: discord.js purge 
Javascript :: create a reactjs app with backend and docker 
Javascript :: spread operator react array 
Javascript :: api integration for web pages in next js 
Javascript :: append to array in js 
Javascript :: button is not calling js function 
Javascript :: remove element from object javascript 
Javascript :: set className with ref react 
Javascript :: js forloop 
Javascript :: change one element in array javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =