Skip to content

Commit 9dab557

Browse files
committed
Updated lesson 10
1 parent 14b58c9 commit 9dab557

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

complete/lesson10/index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
console.log(`Inside myFunc name=${name}`);
3131

3232
if (true){
33-
let course = "The beginners guide to 3D web game development with ThreeJS";
33+
let course = "JavaScript in 12 easy lessons";
3434
const section = 2;
3535
console.log(`course='${course}' inside if statement`);
3636
console.log(`section=${section} inside if statement`);
@@ -45,7 +45,7 @@
4545
}
4646
}
4747

48-
class game{
48+
class App{
4949
constructor(name){
5050
this.days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
5151
this.name = name;
@@ -63,7 +63,7 @@
6363
showDays(){
6464
try{
6565
this.days.forEach( function(day){
66-
console.log(`global name: '${name}' game name:'${this.name}' day:'${day}'`);
66+
console.log(`global name: '${name}' app name:'${this.name}' day:'${day}'`);
6767
});
6868
}catch(err){
6969
console.error(`showDays: ${err.message}`);
@@ -88,10 +88,10 @@
8888
}
8989
}
9090

91-
const myGame = new game("Scope example");
92-
myGame.showDays();
93-
myGame.showDaysSelf();
94-
myGame.showDaysArrow();
91+
const myApp = new App("Scope example");
92+
myApp.showDays();
93+
myApp.showDaysSelf();
94+
myApp.showDaysArrow();
9595
</script>
9696
</body>
9797

start/lesson10/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
console.log(`Inside myFunc name=${name}`);
2828

2929
if (true){
30-
let course = "The beginners guide to 3D web game development with ThreeJS";
30+
let course = "JavaScript in 12 easy lessons";
3131
const section = 2;
3232
console.log(`course='${course}' inside if statement`);
3333
console.log(`section=${section} inside if statement`);
3434
}
3535
}
3636

37-
class game{
37+
class App{
3838
constructor(name){
3939
this.days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
4040
this.name = name;
@@ -44,7 +44,7 @@
4444
}
4545

4646
mouseMove(evt){
47-
console.log(this.name);
47+
//console.log(this.name);
4848
this.x = evt.clientX;
4949
this.y = evt.clientY;
5050
}
@@ -53,13 +53,13 @@
5353
const self = this;
5454

5555
this.days.forEach( function(day){
56-
console.log(`global name: '${name}' game name:'${self.name}' day:'${day}'`);
56+
console.log(`global name: '${name}' app name:'${self.name}' day:'${day}'`);
5757
});
5858
}
5959
}
6060

61-
const myGame = new game('Scope example');
62-
myGame.showDays();
61+
const myApp = new App('Scope example');
62+
//myApp.showDays();
6363
</script>
6464
</body>
6565

0 commit comments

Comments
 (0)