JavaScript modules

<head> <script src=”../js/constants.js” type=”module”></script> <script src=”../js/script.js” type=”module”></script> </head> constants.js export const projects = [ “Project-A”, “Project-B”, “Project-C”, ]; script.js import {projects} from “./constants.js”;

Calculator for Resistor Values

Calculator for 4 rings 1. Ring 2. Ring 3. Ring 4. Ring Value Tolerance brownredorangeyellowgreenbluepurplegreywhite blackbrownredorangeyellowgreenbluepurplegreywhite blackbrownredorangeyellowgreenbluepurplegoldsilver brownredgreenbluepurplegoldsilver 0Ω 0% Calculator for 5 rings 1. Ring 2. Ring 3. Ring 4. Ring 5. Ring Value Tolerance brownredorangeyellowgreenbluepurplegreywhite blackbrownredorangeyellowgreenbluepurplegreywhite blackbrownredorangeyellowgreenbluepurplegreywhite blackbrownredorangeyellowgreenbluepurplegoldsilver brownredgreenbluepurplegoldsilver 0Ω 0%

JavaScript: dot vs bracket notation

During linting my code jshint gave me the “hint” that I should prefer dot notation over bracket notation. “testcase”: data.finding[“testcase”], [‘testcase’] is better written in dot notation. What is that? Accessing members with “.” is called “dot notation”. Accessing them with [] is called “bracket notation”.  

Lint your JavaScript with grunt and jshint

After I’ve introduced You to Yarn I will show You more client side tools in this post. Grunt is a task runner which comes in handy for a lot of setup and configuring work e.g. concatenating and minimizing JavaScript or CSS files To get started You can add grunt via yarn to your project yarn…

Node.js with PyCharm

PyCharm amazes me every time. Although it is first and foremost a python IDE you can do full stack web development with it, i. e. you have code completion for HTML, CSS, JavaScript and even TypeScript, CoffeeScript. I wanted to code some node.js stuff and Jetbrains already got a plugin for PyCharm. Before installation: https://www.jetbrains.com/help/pycharm/2017.1/node-js-and-npm.html…