lab13: init
This commit is contained in:
9
lab13/rabbit.js
Normal file
9
lab13/rabbit.js
Normal file
@@ -0,0 +1,9 @@
|
||||
name = "Monty";
|
||||
function Rabbit(name) {
|
||||
this.name = name;
|
||||
}
|
||||
var r = Rabbit("Python");
|
||||
|
||||
console.log(r.name); // ERROR!!!
|
||||
console.log(name); // Prints "Python"
|
||||
|
||||
Reference in New Issue
Block a user