DEV Community

Singh-Sagar
Singh-Sagar

Posted on

Some important ideas from JavaScript

  • JavaScript is a weakly and dynamically typed language, i.e. there is not much restriction with respect to handling different datatypes and .js code is not compiled and is directly interpreted.
    Image description

  • There is truthy and falsie values in JavaScript. I don't know if there are actually those words, but this idea is real. By default, any string other than empty string or number other than 0 is treated as truthy value in conditionals. This is also applicable to other datatypes too.
    Image description

  • Using square bracket notation [] for accessing object properties is significantly better, at least in my experience as it allows you to dynamically use it, whereas it is not possible with dot notation.

Top comments (0)