Skip to content

Instantly share code, notes, and snippets.

@RohanBhanderi
Created March 15, 2018 20:11
Show Gist options
  • Save RohanBhanderi/4016235b36fbee0ede2281fc0e825357 to your computer and use it in GitHub Desktop.
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
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