Skip to content

Commit 849d8b8

Browse files
committed
Have a place to put some example code.
1 parent cca021a commit 849d8b8

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

js/scratch-pad.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(function (context) {
2+
var Sample = {};
3+
4+
Sample.switchCase = function (x) {
5+
var returnValue;
6+
swtich(val) {
7+
case 2:
8+
returnValue = 'A'
9+
break;
10+
case 6:
11+
returnValue = 'B'
12+
break;
13+
case 9:
14+
returnValue = 'C'
15+
break;
16+
default:
17+
returnValue = null;
18+
}
19+
return returnValue;
20+
};
21+
22+
return context.Sample = Sample;
23+
24+
Sample.hashAccess = {2: 'A', 6: 'B', 9: 'C', '2': 'D'}[val];
25+
})(this)

0 commit comments

Comments
 (0)