Category: JavaScript

  • Javascript Constructors

    Javascript Constructors

    The constructor method is a special method for creating and initialising an object created within a class. When it comes to JS the syntax is slightly different as you can see in the example snippet below If one runs the above code through a transpiler like Babel for browser compatibility, the following code…

  • Javascript Object – ES5+

    Javascript Object – ES5+

    Javascript is being updated at a rapid pace over the years and here are some of the new features that I came across ( ES5 + onwards ). Object.defineProperty( ) This method allows a precise addition to or modification of a property on an object. Object.create( ) A little refresher…

  • Debug React with VSCode

    Debug React with VSCode

    Found a real good article on how to setup your Visual Studio Code Editor to debug React JS App. On a high level here is what needs to be done: 1. Install the Debugger for Chrome extension. 2. Configure the Chrome Debugger Create a launch.json file in a new .vscode…

  • JS – Truthy vs Falsy

    JS – Truthy vs Falsy

    Recently started my journey with JS ( again… this time learning React JS ) . Came across this  IF condition which defied all logical explanations ( to me at least ) var flag = true; if(flag && “Flag is true”) { //console.log(“\n Prints Flag is True, Strange !!”); } The…

  • Prototype in JavaScript

    Prototype in JavaScript explained well