Skip to content

Commit f8929f7

Browse files
author
rafael cervantes
committed
Section 5
1 parent 3a3049c commit f8929f7

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

2-JS-basics/final/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ var age = 28;
3636
console.log(firstName + ' ' + age);
3737
3838
var job, isMarried;
39+
console.log("job: "+job);
40+
3941
job = 'teacher';
4042
isMarried = false;
4143

2-JS-basics/starter/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,12 @@
77

88
<body>
99
<h1>Section 2: JavaScript Language Basics</h1>
10+
11+
12+
1013
</body>
14+
<script>
15+
console.log("hello wirld");
16+
</script>
17+
1118
</html>

5-advanced-JS/final/script.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ var Person = function(name, yearOfBirth, job) {
1111
this.name = name;
1212
this.yearOfBirth = yearOfBirth;
1313
this.job = job;
14+
15+
1416
}
1517
1618
Person.prototype.calculateAge = function() {
@@ -102,7 +104,7 @@ console.log(obj.city);
102104
/////////////////////////////
103105
// Lecture: Passing functions as arguments
104106
/*
105-
var years = [1990, 1965, 1937, 2005, 1998];
107+
var years = [1990, 1968, 1937, 2005, 1998];
106108
107109
function arrayCalc(arr, fn) {
108110
var arrRes = [];
@@ -113,7 +115,7 @@ function arrayCalc(arr, fn) {
113115
}
114116
115117
function calculateAge(el) {
116-
return 2016 - el;
118+
return 2018 - el;
117119
}
118120
119121
function isFullAge(el) {
@@ -134,14 +136,15 @@ var fullAges = arrayCalc(ages, isFullAge);
134136
var rates = arrayCalc(ages, maxHeartRate);
135137
136138
console.log(ages);
139+
console.log(fullAges);
137140
console.log(rates);
138141
*/
139142

140143

141144

142145
/////////////////////////////
143146
// Lecture: Functions returning functions
144-
/*
147+
145148
function interviewQuestion(job) {
146149
if (job === 'designer') {
147150
return function(name) {
@@ -169,7 +172,7 @@ designerQuestion('Mark');
169172
designerQuestion('Mike');
170173

171174
interviewQuestion('teacher')('Mark');
172-
*/
175+
173176

174177

175178

0 commit comments

Comments
 (0)