DEV Community 👩‍💻👨‍💻

Discussion on: ES6: Default parameters explained

jonrandy profile image
Info Comment hidden by post author - thread only visible in this permalink
Jon Randy • Edited on
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

j471n profile image
Jatin Sharma

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

naftalimurgor profile image
Naftali Murgor Author

Thanks for the feedback. Will update to fix the error

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