DEV Community

Discussion on: ES6: Default parameters explained

Collapse
 
jonrandy profile image
Info Comment hidden by post author - thread only visible in this permalink
Jon Randy 🎖️ • Edited
const myWalletTwo = restoreWallet('0x05417') // json defaults to true if not supplied
Enter fullscreen mode Exit fullscreen mode

This is not correct.

In this case, dumpToJson will be '0x05417' and privateKey will be undefined

Collapse
 
naftalimurgor profile image
Naftali Murgor

Thanks for the feedback. Will update to fix the error

Collapse
 
j471n profile image
Jatin Sharma

Exactly we pass default parameters in the end of all the other parameters.

Some comments have been hidden by the post's author - find out more