showing results for - "javascript skip default parameter"
Edoardo
26 Nov 2019
1function myfunc(x,y=2,z=6){
2  console.log(x*y);
3  console.log(z);
4}
5myfunc(5) //Output: 10 6
6myfunc(5,4,2) //Output: 20 2
7myfunc(5,undefined,17) //Output 10 17