Section 2- Javascript - CS 142 Discussion Session Javascript Set up the environment Install Node.js Download and install node.js from

Section 2- Javascript - CS 142 Discussion Session...

This preview shows page 1 - 14 out of 36 pages.

CS 142 Discussion SessionJavascript
Background image
Set up the environment
Background image
Install Node.jsDownload and install node.js from Run command:node -vnpm -vShould see version number
Background image
Download the Project2 CodeUnzip the directorynpm install
Background image
Checking Your Codejshintnpm run jshint
Background image
Test Your CodeRun html file on browsernpm test
Background image
Starter Code
Background image
The Provided Codecs142-test-project2.htmlcs142-test-project2.jsnode_modulespackage.jsonrun-tests-using-node.js
Background image
cs142-test-project2.html<head><title>CS 142 Project 2 Test</title><script src="./cs142-make-multi-filter.js"></script><script src="./cs142-template-processor.js"></script><script src="./cs142-test-project2.js"></script></head>
Background image
cs142-test-project2.js'use strict';
Background image
cs142-test-project2.jsBlock Comments/** This file tests the CS142 Project #2 JavaScript assignment problems. It prints what* it finds to the console log and updates the text being displayed in the window with a* summary of the results.*/Line Comments// We assume these symbols will be globally defined by the user.
Background image
cs142-test-project2.jsvar cs142MakeMultiFilter;var Cs142TemplateProcessor;global scopeundefined if they are not defined anywhereif they are defined in the global scope by some other script, they will have those values.
Background image
cs142-test-project2.js
Background image
Image of page 14

You've reached the end of your free preview.

Want to read all 36 pages?

  • Fall '09
  • html file, Cs142-test-project2.js- Testing p1

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture