Created
September 28, 2021 13:05
-
-
Save momolinus/b6137e691ec70f7cd314b5225173400f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let cfg_fnc = function(cfg = { | |
duration: 10, | |
delays: [3, 6] | |
}) { | |
return "duration: " + cfg.duration + ", delays: " + cfg.delays; | |
} | |
// prints "duration: 5, delays: undefined" | |
console.log(cfg_fnc({duration:5})); | |
// prints "duration: 10, delays: 3,6" | |
console.log(cfg_fnc()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment