defoult function atributes
function multiply(a, b = 1) {
return a * b;
}
console.log(multiply(5, 2));
// expected output: 10
console.log(multiply(5));
// expected output: 5
Also in JavaScript:
- js object length
- how to expand compressed js file vscode
- Detect the city on application launch via geolocation react native
- angular 6 reload current page
- js capitalize first letter of each word
- js convert truthy
- type a promise
- array map order by timestamp reactjs
- remove character at index from string javascript
- javascript count digits
- javascript how to reverse a string
- convert negative number to positive in javascript
- send data from form to another page angular
- nuxt js emit event
- rails to json
- angular http call caching issue even after no-cache
- how to register key presses in p5.js
- check if field exists in object javascript
- tsconfig.json not generated
- javascript push and concat
- javascript remove last word from string
- javascript date to utc format
- javascript explode space
- javascript vs java