Truthy and Falsy values:

  • false
  • 0 (zero)
  • '' or "" (empty string)
  • null
  • undefined
  • NaN
  • '0' (a string containing a single zero)
  • 'false' (a string containing the text “false”)
  • [] (an empty array)
  • {} (an empty object)
  • function(){} (an “empty” function)

Null vs Undefined:


Fundamental:


Block-level bindings in ECMAScript 6, and offers some best practices for using them.

Var Declarations and Hoisting:

function getOutput(condition) {

if (condition) {
var output = "car";


return output;
} else {

return null;
}

}
function getOutput(condition) {

var output;

if (condition) {
output= "car";

return output;
} else {

return null;
}
}

Block-Level Declarations:

  1. Inside of a function
  2. Inside of a block (indicated by the {and} characters)

charAt():

concat():

Murad Habib

Full Stack Web Developer & IT Expert

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store