1
1
module ( "About Reflection (topics/about_reflection.js)" ) ;
2
2
3
- var A = function ( ) {
4
- this . aprop = "A" ;
3
+ function A ( ) {
4
+ this . aprop = "A" ;
5
5
} ;
6
6
7
- var B = function ( ) {
7
+ function B ( ) {
8
8
this . bprop = "B" ;
9
9
} ;
10
10
@@ -14,7 +14,7 @@ test("typeof", function() {
14
14
equal ( __ , typeof ( { } ) , 'what is the type of an empty object?' ) ;
15
15
equal ( __ , typeof ( 'apple' ) , 'what is the type of a string?' ) ;
16
16
equal ( __ , typeof ( - 5 ) , 'what is the type of -5?' ) ;
17
- equal ( __ , typeof ( false ) , 'what is the type of false?' ) ;
17
+ equal ( __ , typeof ( false ) , 'what is the type of false?' ) ;
18
18
} ) ;
19
19
20
20
test ( "property enumeration" , function ( ) {
@@ -40,7 +40,7 @@ test("hasOwnProperty", function() {
40
40
equal ( __ , keys . length , 'how many elements are in the keys array?' ) ;
41
41
deepEqual ( [ __ , __ ] , keys , 'what are the properties of the array?' ) ;
42
42
43
- // hasOwnProperty returns true if the parameter is a property directly on the object,
43
+ // hasOwnProperty returns true if the parameter is a property directly on the object,
44
44
// but not if it is a property accessible via the prototype chain.
45
45
var ownKeys = [ ] ;
46
46
for ( propertyName in b ) {
@@ -56,8 +56,8 @@ test("constructor property", function () {
56
56
var a = new A ( ) ;
57
57
var b = new B ( ) ;
58
58
equal ( __ , typeof ( a . constructor ) , "what is the type of a's constructor?" ) ;
59
- equal ( __ , a . constructor . name , "what is the name of a's constructor?" ) ;
60
- equal ( __ , b . constructor . name , "what is the name of b's constructor?" ) ;
59
+ equal ( __ , a . constructor . name , "what is the name of a's constructor?" ) ;
60
+ equal ( __ , b . constructor . name , "what is the name of b's constructor?" ) ;
61
61
} ) ;
62
62
63
63
test ( "eval" , function ( ) {
0 commit comments