JavaScript
Presence shorthand

by Benny Neugebauer

if (typeof name !== "undefined" && name !== null) {
  console.log('name is defined');
}

if (name) {
  console.log('name is defined');
}