Javascript hoisting example


Dev-Bookmarks Logo

Save up to a workweek a year by efficiently managing your dev bookmarks, on www.bookmarks.dev. Share your favorites with the community and they will be published on Github - Star


<head>
<title>Hoisting example</title>
</head>
<body>
    <h1>Hoisting in action</h1>
    <script type="application/javascript">
        var hoisting = "global variable";
        (function(){
            confirm("\"" + hoisting + "\"" + " click OK" );
            var hoisting = "local variable";
            alert(hoisting);
        })(); //self-executing function 

     //Best practice - declare local variables at the beginning of the function 
    </script>
</body>

A cleaner multi-stage continuous deployment on Kubernetes of a Create React App with kustomize, helm and skaffold

This blog posts presents a clean way to make a multi-stage deployment of a Create React App on a Kubernetes Cluster. Deployments with kubectl, helm charts, kustomize and skaffold are presented. Continue reading