Short-circuits conditionals

If you have to execute a function only if condition is true, you can use short-circuit.

// Instead of this
if (condition) {

// You can use short-circuit
condition && doSomething();

Logical AND

In JavaScript, the logical AND operator will return true if both operands are true. It returns false in any other scenario. Here are a few simple examples:

true && true
// true
true && false
// false
false && false
// false

You can also read this

The :valid CSS pseudo-class

The :valid CSS pseudo-class represents any  <input> or other <form> element whose...

input:valid {
  background-color: powderblue;

Simple Todo app with Node.js and Express

In this quick tutorial we will be creating a Todo...

app.listen(8080, function () {
  console.log('Running on port 8080!')