Created
March 15, 2018 20:11
-
-
Save RohanBhanderi/4016235b36fbee0ede2281fc0e825357 to your computer and use it in GitHub Desktop.
default-value-assignment created by RohanBhanderi - https://repl.it/@RohanBhanderi/default-value-assignment
This file contains hidden or 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
const DEFAULT_PROCESS_ASYNC = true; | |
// config.processAsync may be undefined but never null | |
const config = { | |
processAsync: undefined, | |
}; | |
// default value assignment | |
const { | |
processAsync = DEFAULT_PROCESS_ASYNC, | |
} = config; | |
console.log(processAsync); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment