Default parameters in JavaScript function

Published: 16 January 2018
on channel: Ashok Codes
67
0

Default parameters in function, allow parameters with default values,

if no value or undefined

like

function mycolor(color="red"){
console.log(color)
}

mycolor("Green")
expected output: Green

mycolor()
expected output: red


On this page of the site you can watch the video online Default parameters in JavaScript function with a duration of hours minute second in good quality, which was uploaded by the user Ashok Codes 16 January 2018, share the link with friends and acquaintances, this video has already been watched 67 times on youtube and it was liked by 0 viewers. Enjoy your viewing!