Permalink
Browse files

Added fan-test.js, also declared 'use strict' in do-nothing.js and co…

…rrected spacing.
  • Loading branch information...
1 parent 4f96fa2 commit 6d1f1a141b8fac7a16650bb0cbb6c47dbc69ef88 Erik Vorhes committed Aug 19, 2011
Showing with 21 additions and 3 deletions.
  1. +1 −1 README.md
  2. +2 −2 do-nothing.js
  3. +18 −0 fan-test.js
View
@@ -2,7 +2,7 @@
This is a collection of scripts that don't really do anything useful.
-I've created a sample script file to get us started. Please add your own!
+I've created a couple script files to get us started. Please add your own!
This is licensed under the [WTFPL][]. Have fun.
View
@@ -1,9 +1,9 @@
(function (context) {
+ 'use strict';
function doNothing () {
return;
}
context.doNothing = doNothing;
-
-} (this));
+}(this));
View
@@ -0,0 +1,18 @@
+(function (context) {
+ 'use strict';
+
+ function fanTest () {
+ var i = 1;
+
+ while (i) {
+ i = i + 1;
+ // Let's be nice and not throw errors in browsers that don't have consoles ...
+ if (!!console) {
+ i < 10000 && console.log('These fans work great!');
+ i >= 10000 && console.log('Listen to the music those fans make!');
+ }
+ }
+ }
+
+ context.fanTest = fanTest;
+}(this));

0 comments on commit 6d1f1a1

Please sign in to comment.