Subcategories

JavaScripts at JavaScript Kit

Many different scripts to enhance websites, plus tutorials.

Javascriptkit website

Node JS Shopping Cart Tutorial

This tutorial uses Express Generator to scaffold the project. The full tutorial is here: YouTube playlist

Working with Collections in JavaScript

This is a nice article explaining map() reduce() & filter() in JavaScript

http://www.datchley.name/working-with-collections/

Node Timer example

Here is code which will increment a timing function for 3 seconds:

var waitTime = 3000;
var curTime = 0;
var waitInterval = 100;
var percentWait = 0;

function writeWaitingPct(p) {
  process.stdout.clearLine();
  process.stdout.cursorTo(0);
  process.stdout.write(`waiting ... ${p} %`);
}

var interval = setInterval(function () {
  curTime += waitInterval;
  percentWait = Math.floor((curTime/waitTime)*100);
  writeWaitingPct(percentWait);  
}, waitInterval);

setTimeout(function() {
  clearInterval(interval);
  writeWaitingPct(100);
  console.log("\n\nDone!\n");
}, waitTime);

process.stdout.write("\n");
writeWaitingPct(percentWait);

This works with Node JS

Javascript Escape Characters

http://www.c-point.com/javascript_tutorial/special_characters.htm

When you need to output longs string sentences, you may need to escape certain characters.

Javascript Object Comparison

https://stamat.wordpress.com/2013/06/22/javascript-object-comparison/

Article about Objects in JS