00:00:00 – ECMAScript
00:03:35 – Closures
00:13:47 – Immediately Invoked Function Expression
00:22:53 – First-Class Functions
00:34:19 – Synchronous? Async? Single-Threaded?
00:40:07 – Asynchronous JavaScript
00:40:18 – Execution Stack
01:00:18 – Overflow
01:01:47 – Asynchronous Functions
01:03:05 – Callbacks
01:09:41 – Promises
01:20:57 – Async/Await
01:26:32 – this
01:43:48 – Browsers and the DOM
Original source
36 responses to “JavaScript, ES6 – Lecture 1 – CS50's Mobile App Development with React Native”
I prefer async await
hi Jordan, I bet you are a very nice person and you know JS in and out and got very good grades. So, your professors thought you might be a good fit to teach this course. I don't think it is completely your fault but the best way to learn from your teaching is just taking the syllabus of yours and read/watch the material from somewhere else. Your explanations are very poor in terms of building an understanding around the topic. Reasoning is often lost and generally given at random points. Explanations for Closures, Prototypal inheritance, classess are impossible to grasp from you. Imperative vs Declarative Programming explanation is just funny.
where can i get the DOM related video to solve project 0?
"Does that make sense to everybody?" is usually because he knows he did not explain something well. Sorry but this teacher is just not as good as the others.
I don't know the difference between Lecture 0 and Lecture 1
I tried running the code at 34:10 and got an error. i guess there is an error to do with forEach..
21:43 can't this be done this way
const arr = ( function(){
let newArr = [];
for (let i=0; i<5; i++){
newArr.push(i);
//console.log(i);
}
return newArr;
})();
console.log(arr[0])
Editing is really not good. Why keep showing the presenter instead of the code? I see this over and over in code presentations. At most stick him in a little picture in picture box, this is really hard to follow.
Does that make sense to everybody?
54:07 why printTwo go to queue before printOne. APIs area is not a stack, right?
It would be really helpful if the code screen is always in the background. It's easier to follow the lecturer if we are allowed to study the code on the screen while the lecturer talks. Right now every time I try to look at the code more closely, the camera switches views away from the code and interrupts my concentration.
For anyone searching for course material because original CS50 repository was deleted, I found another one: https://github.com/jhhayashi/react-native-course
worst lecturer ever and I mean it.
does that make sense
1:47:31 hy where i can get these sections?
Why is it called an execution 'stack' when the functions which are written first enter the stack and get executed first? (Print Three enters after PrintTwo after PrintOne, in the order they are written)
I tried my best to use node js with Sublimetext in my windows PC I could not solve the environment so I moved to VisualStudioCode
can we get some exercise questions to solve on each of the topics covered in the video ??
1:21:10 we are using async await in development extensively as of now, 2019
So great!!
I still dont get how the iife fixs the problem, can someone please elaborate ?
What happens if the functions in stack take more than 1 second to execute but another async function has a timeout of 1 sec? Does that mean that it may take more than 1 sec for that async function to actually execute?
For people who don't fully understand the event loop, the call stack and so on, here is a site that can visualize JS call process, made by Philip Roberts. Write some code and see it for yourselves. http://latentflip.com/loupe
The explanation on variable lifecycle is a little confusing. Let me explain more to help you better understand that concept. If I put anything wrong, critism and correction is always welcomed.
First, remember this, the lifecycle of a variable declared with let is in the block scope(meaning you can't access it outside the code block where it was born) and that of one declared with var is in a function scope(same meaning with the function).
Here is the code with comment I added.
Copy the code into your editor to get better formatting and reading experience.
function makeArray() { // If you declared the i with var, you can get it here bucause of hoisting and the var function scope lifecycle, but it will be undefined.
const arr = []
for (var i = 0; i < 5; i++) { //Beginning of the code block that i exists in.This is where i was born. You can use it from here if you used let.
//If you were to log out the i value with var or let here, there will be no differences. They will both iterate as expected.
arr.push(function () {
console.log(i)
})
/They will also log out the same iteration here as expected.
} //Curly ends. End of the code block with i. Since the lifecycle of a variable with let is the block scope, i with let dies right here. You can't get any i with let here.
//But var still lives here cuz the lifecycle of a variable wtih var is the function scope and the function has not ended yet. So here you can log out the i with a value of 5 with var. It's not about the iteration of i.
return arr /*This returns console.log(i). With let, it will use every i value in every iteration as expected cuz no i value outside the code block and therefore no value-shadowing. But with var, console.log(i) will directly use the i value outside the iteration code block because they are on the same level. Once the function finds an i, there is no need for it to dig into the code block to use the i there.*/
} //Function ends, i with var dies
const functionArr = makeArray()
functionArr[0]()
9:40 i is not defined. It's not undefined. In JavaScript, not defined and undefined are totally two different things. Not defined is a kind of reference error and undefined is a kind of type.
How do we join Slack from outside of the college.
At 1:05:49 Why do we add "Function" ? Is console.log not a function?
where i find this course full material
where do i find this course full stuff
regarding 12:44, there wouldn't be an error. But instead, the variable declared within the block scope would just shadow the variable declared unless you are using const in the for loop
I don't really get 21:30
Can anyone explain while this.name did not work inside the js file>
I have a question on 11:47,
function makeFunctionArray = function() {
const arr = []
for (let i = 0; i < 5; i++) {
arr.push(function() { console.log(i) })
}
return arr
}
const functionArr = makeFunctionArray()
functionArr[0]()
you say i 's scope is only from line four to line six, but can you turn the same for loop to a same while loop? when you turn the for loop to while loop, the let can't be in the {}, the result is 5, so how can explain the for loop?
What is the difference between call () and apply()
Why slides of lecture are not able to download?
That Microsoft Board is reallllly bad.