Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.rawgit.com/lodash/lodash/3.0.1/lodash.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
// taking in account that undefined == null
console.log('undefined == null -> ' + (undefined == null))
let collection = {
  a: undefined,
  b: 2,
  c: 4,
  d: null,
}
console.log(_.omit(collection, it => it == null))
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers