Nice article on: JavaScript variable scope hoisting

0 Comments

https://www.sitepoint.com/demystifying-javascript-variable-scope-hoisting Things to Remember All declarations, both functions and variables, are hoisted to the top of the containing scope, before any part of your code is executed. Functions are hoisted first, and then variables. Function

Two nice articles on RxJS

0 Comments

The first article is a nice introduction. https://www.barbarianmeetscoding.com/blog/2016/04/11/getting-started-with-rx-dot-js/ and the second takes a more functional approach on the first article https://glebbahmutov.com/blog/extra-fp-for-rx/

How to convert a function definition as string to code in JavaScript

0 Comments

  Just a snippet for converting a function as string to code:   Code <!doctype html><html><head>    <meta charset=”utf-8″ />    <meta http-equiv=”x-ua-compatible” content=”ie=edge”>    <title>Research</title>    <meta name=”description” content=”A page to quickly spike some code or styling.”>    <meta

ES6 modules

0 Comments

Just some reminders, when working with ES6 modules: ES6 modules are automatically strict-mode code, even if you don’t write "use strict"; in them. When you run a module containing an import declaration, the modules it

Exclude file paths from jshint with gulp

0 Comments

If you want to jshint all JavaScript files in a folder, but want to exclude a subfolder, you can use “negation” in gulp.     var gulp = require("gulp"); var jshint = require("gulp-jshint"); var plumber

Pretty print json unit test error results with Jasmine

0 Comments

      If you use the standard HTML reporter for jasmine an expect like: expect(JSON.stringify(actual)).toEqual(JSON.stringify(expected)); would result in:   If you replace the div tag with a pre tag in the “jasmine-html.js” file.