Skip to content

Instantly share code, notes, and snippets.

@midu
Created October 31, 2014 15:53
Show Gist options
  • Save midu/350f86daf4de8e354eb5 to your computer and use it in GitHub Desktop.
Save midu/350f86daf4de8e354eb5 to your computer and use it in GitHub Desktop.
results = for testValue in [false, [], 0, {}, '', null, undefined, (->), true, '0']
  a = testValue
  b = testValue
  
  {
    "value": testValue
    '||=': a ||= 'assigned'
    '?=': b ?= 'assigned'
  }

console.table results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment