This is a revised edition of the JavaScript Essentials video I published well over 3 years ago. This includes some corrections to my previous video as well as some updated essentials. It is also a direct replacement for the previous video, so there is no need to watch both.
Original source
33 responses to “Javascript Essentials (Revised)”
LOL
Fan of Douglas Adams!
The meaning of life = 42.
Hi Travis, what is the IDE you being used ?
Mr Tidwell, may I ask which eidtor are you using? I an new to JS
Your video is like a premium tutorials, thank you..
Hi Travis,
I'm watching your great video and noticed a point (33:18) which i think was not clear enough.
You're talking about scopes but another very important thing here is the execution scheduling: The setTimeout, moves the callback function into the event queue which is executed ONLY when the current execution stack is over (even if you use 0ms as the delay parameter).
This means the anonymous function is executed AFTER the for loop has finished its all iterations, and THEN the scope issue arises to explain how the anonymous function is aware to the loop index when it runs.
Thanks for your video!
Hi Travis on 50:50 the code actually 'sayName'
var person ={
firstName: 'Izuchukwu',
lastName: 'Anthony',
sayName: function() {
console.log(this.firstName + ' ' + this.lastName);
}
};
//person.sayName();
setTimeout(person.sayName(),2000);
I guess you called a ver with "setTimeout(person.sayName.1000); instead of a function sayName()
Hi Travis , I am new to JavaScript but understand some basic atm, But can i ask after printing out on the console the following
console.log(parseInt(theMeaningOfLife, 10) + 2); what is the 10 for inside the bracket for ??
Hi. I'm pretty new to coding but I have a question for an experienced coder. Is it a bad idea to try to learn from videos from 2015? How much does a language change from year to year?
Hello Travis,
When you talked about the "this" in scope and context, I changed "person.sayName" to "person.sayName()" in the setTimeout.
it worked in Chrome browser. Is this implicit in using the bind like the example in your video?
var person = {
firstName: 'Test',
lastName: 'Test',
sayName: function() {
console.log(this.firstName + ' ' + this.lastName);
}
};
setTimeout(person.sayName(), 1000);
Excellent tutorial. Thank you.
Run this at 1.25x. Thank me later.
This is an excellent video. It hits so many important points concisely and with good pacing. Thank you Travis
Slide over to 5:58 to skip his commercial message.
Could you tell me how to make the presentation material like this? I've been using PPT, but this…wow!
very nice explanation of 'this'
Hello Good people – I am learning to build apps (both mobile/Web) which I will then sell on app stores. I want to build a company in the future to do so. I have already invested in Treehouse and learned basics of python, swift, Javascript, SQL and HTML>CSS. Now I want to dig deeper – in an area where I start connecting the dots. Build a page connect it to a server, record data in a database. I want to DIY in the app world in short. What should I LEARN ???
This video is gold. Thank you Travis!
Hi Travis..Could you please clear my doubt. Why am I getting different results
https://jsfiddle.net/vihano/w0cggd0s/
var Fruit1 = function(name, color, shape) {
this.currName = name;
this.currColor = color;
this.currShape = shape;
this.describe = function() {
return ("The color of " + this.currName + " is " + this.currColor + " and the shape is " + this.currShape);
};
};
var Fruit2 = function(name, color, shape) {
this.currName = name;
this.currColor = color;
this.currShape = shape;
return {
describe: function() {
return ("The color of " + this.currName + " is " + this.currColor + " and the shape is " + this.currShape);
}.bind(this)
};
};
var apple1 = new Fruit1("Royal Gala", "Red", "Round");
var apple2 = new Fruit2("Royal Gala", "Red", "Round");
apple1.currName = "Washington Apple";
apple2.currName = "Washington Apple";
console.log(apple1.describe());
console.log(apple2.describe());
}
Quick question, at 51:11 , if we set the setTimout method to this :
setTimeout(person.getinfo() , 1000);
why does adding the parenthesis to "getinfo" makes it work?
What font are you using Travis?
Hi Travis
( function(){
var messages = ["Hello", "There"];
var say=function(index)
{
return function()
{
console.log(messages[index]);
};
};
for(var i in messages)
{
setTimeout(say(i), 1000); //Works
say(i); //Does n't Work
setTimeout(function(){say(i)}, 1000); //Does n't work
}
}
https://jsfiddle.net/vihano/r6wvkbgj/
Could you Explain this ?
Unfortunate that there's a repeating super high frequency "ding" sound.
I needed just 15 random seconds of this video to subscribe you. When i saw how you explain a simple function i knew that the whole video its awesome ! Best tutorial so far and really good explanations. I hope you're doing more videos. Keep up the good work.
Thank you. I enjoyed the course. I am curious as to what IDE you are using?
Thanks, it helps a lot. Great, clear and focused explanation
Great value, sir. Well done.
Excellent! I was unaware of prototype in Javascript. Thanks Travis!
Thank you so much for this! So clear and concise, exactly what I was looking for. Really well thought out and intelligent examples throughout. The last 10 minutes started to get a bit challenging as the concepts started to stack up so had to listen over a few times. Not much better use of an hour than this!
you are genius!!!
I thought I knew a fair amount of js and 12 minutes in learnt something new. Thanks for the tutorial
Very good content and well explained. Audio is quit good but if you want to make it perfect you might want to consider your room acoustic. Seems to interfere with the audio quite a bit because there is quite a bit of echo of your voice from the naked walls in the room. I am by no means an acoustic expert but i think your audio can become a bit more pleasant if you would either turn down your mic say 5-10%, perhaps try to put a muffler on the mic or putting some dampening material on your walls. Looking forward to more of your content. Well done. Thank you very much for your efforts.
Please help,
Yes, if you can help how to set JAVA environment on notepad++
Or, maybe any other editor…?
Thanx in advance…
None of the 2 links in the video work