Best of LoggingJuly 2021

  1. 1
    Article
    Avatar of devtoDEV·5y

    JavaScript Hoisting

    JavaScript hoisting refers to the process where the compiler allocates memory for variable and function declarations prior to execution of code [1]. That means that declarations are moved to the top of their scope before code execution regardless of whether its scope is global or local. The code snippets below show hoisting in action: declare the function first and use/invoke it after.

  2. 2
    Article
    Avatar of devtoDEV·5y

    JavaScript's Forgotten Keyword (with)

    The "with" keyword can be used to inject arbitrary objects into a scope chain. It can also introduce security vulnerabilities. It is forbidden in strict mode for a reason. It adds some interesting capabilities to the language, but ultimately it is not a must-use keyword.

  3. 3
    Article
    Avatar of devtoDEV·5y

    Making your console log statements stand out

    console.time() and console.timeEnd() can be used to show how much time a particular block of code takes to run. You can group a set of console logs having a particular meaning apart from the rest using this method. Using various format specifiers inside them, you can also log objects as such: console.group andconsole.groupEnd. Using console.collapsed() to have the logs closed by default.

  4. 4
    Article
    Avatar of devtoDEV·5y

    What JavaScript do you need to know to write Single-Page-Applications more effectively: A Guide

    This article covers what aspects of JavaScript I have used when developing using React or Vue. It is not absolutely necessary to know all of these concepts to use React orVue. The basics of JavaScript are going to be important. Using JavaScript we can directly alter what we can see in the browser.

  5. 5
    Article
    Avatar of devtoDEV·5y

    Classes in JavaScript

    A class is a blueprint for creating objects, initializing data, and defining functions. By using a class, a programmer can create specific instances of said class and access class-specific data and functions. Classes are this concept of using templates to create different but similar objects without having to re-type code.

  6. 6
    Article
    Avatar of hashnodeHashnode·5y

    Functions in Javascript, Function Expression, JavaScript, First class

    function is a block of statements, which is written to perform a particular task. A function declaration is also termed as Function Statement. When we create a function and assigned to a variable like any other value then it is called function expression. In Javascript, functions are first-class citizens, meaning functions can be treated like any else.

  7. 7
    Article
    Avatar of hashnodeHashnode·5y

    Best Practices of Exception Handling

    Exception handling is one of the most important aspects of software engineering. I have seen other developers and myself making mistakes and not exiting gracefully. In this article, I am documenting my share of learnings along the process. I am dividing this article into two sections: Handling exceptions inside code and Handling exceptions outside code.