JavaScript Essentials

  Рет қаралды 67,972

Travis Tidwell

Travis Tidwell

Күн бұрын

Пікірлер: 46
@bertobertoberto3
@bertobertoberto3 12 жыл бұрын
Clearest explanation I've seen of JavaScript's idiosyncracies, especially the closure aspects.
@JustinGordon808
@JustinGordon808 11 жыл бұрын
Nice refresher on the madding syntax of OO-javascript.
@NathanPhelpsMcPhelpsius
@NathanPhelpsMcPhelpsius 11 жыл бұрын
Exceptionally well done and useful. Thanks. JavaScript OO has been driving me in crazy circles
@travist349
@travist349 11 жыл бұрын
Thanks for the correction. I will refer to your comment in the annotations.
@travist349
@travist349 12 жыл бұрын
You are right. they behave the same. So, anti-pattern may be to harsh. However, I prefer defining functions through assignment because you are being explicit about its context. It is also more consistent since there are many cases when you are forced to assign a function to a variable,like in object literals. Because of this,I consider function declaration through assignment a more consistent pattern, and not necessarily an anti-pattern. Thanks for your input! Good point!
@ramg9263
@ramg9263 9 жыл бұрын
In the colors printing example(video stream:23:55) why did you return the function inside anonymous function. I have written like below it's working fine. var clrs=["red","blue","yellow","green"]; for(var i=0;i
@widebandrecords902
@widebandrecords902 9 жыл бұрын
Working fine and working in code that sits with over 100 other lines of code is two different things totally.. Javascript is evaluated and compiled on the fly before it is run..
@sagaruv
@sagaruv 12 жыл бұрын
You did a great job bro.... I liked your narration and the way you presented the topic. Cool...
11 жыл бұрын
in js how can i execute another js function from inside another function so that if i wanted to i could do 2 functions if conditions are met its for a chat app im making so a sound fx is hurd on new messages?
@SultanShakir
@SultanShakir 11 жыл бұрын
I see this was done a year ago. So maybe that is why I am getting different outputs in my Chrome console. Maybe I have some other setting enabled. I don't know. Do you know what version of Chrome you were using at the time?
@nquinn72185
@nquinn72185 11 жыл бұрын
That's due to hoisting. All variables and functions get pulled to the top of it's scope. In that case your better off declaring the function as a variable declaration. function container_fn(){ var abc; if(x){ abc = function(){ y=z; } }else{ abc = function(){ y=a; } abc()}
@widebandrecords902
@widebandrecords902 9 жыл бұрын
Great video Travis!!!!
@VicVlasenko
@VicVlasenko 12 жыл бұрын
thanks. example with prototype was very useful.
@heyhelloallpeople
@heyhelloallpeople 12 жыл бұрын
Thanks you very much and this tutorial very helpfull! and easy for beginners learn to JavaScript! Also I'm watched your from Azerbaijan, Sir!
@KEFFAK
@KEFFAK 12 жыл бұрын
regarding the this pointer. Say we have the function test defined as: function test(){ console.log(this); } we can just say var hello = new test(); and then this will be assigned. So why is declaring a function as function test() anti-patern?
@viktorlubchuk1372
@viktorlubchuk1372 10 жыл бұрын
very nice and instructive lesson. thank's Travis
@MrStimpy77
@MrStimpy77 11 жыл бұрын
I just learned a use case where "function x()" is problematic. In this example: function container_fn() { if (x) { function abc() { y=z; } } else { function abc() { y=a; } } abc(); } I just learned that the runtime will actually vary between browsers, and typically both functions will be pulled out of the condition block and put at the top. // engine unpredictably generates: function container_fn() { function abc() { y=z; } function abc() { y=a; } if (x) {} else {} abc()
@wallisafza
@wallisafza 10 жыл бұрын
awesome... nice to watch the video...
@jolres
@jolres 12 жыл бұрын
The reason why the first example did not work was because you were doing this: console.log('Travis'.length); as opposed to this: console.log(myvariable.length); I know you probably figured this out by now. But I posted it just in case and for others to see.
@FrankMarti
@FrankMarti 12 жыл бұрын
Thanks for the upload! Very helpful!!
@deanshelton913
@deanshelton913 10 жыл бұрын
Aren't string keys required as a valid JSON spec?
@asdqwe4427
@asdqwe4427 9 жыл бұрын
Yes they are. An object literal is not a json string. He should have been clearer on that. They map very all to each other, but they are not the same thing.
@irv140
@irv140 9 жыл бұрын
How can you call a function if you didn't first give it a name? Possible?
@travist349
@travist349 9 жыл бұрын
irv140 You can either pass it to another function as a "callback" argument, which it then assigns to a variable to be called later, or you can call it immediately as a self-executing anonymous function as I explain in this video.
@vivametal666
@vivametal666 11 жыл бұрын
Gracias amigo saludos desde México
@santosharakere
@santosharakere 10 жыл бұрын
Great video. Thank you. - Santosh
@dongdongzheng
@dongdongzheng 12 жыл бұрын
This is awesome!
@harryjandu9827
@harryjandu9827 10 жыл бұрын
Could you make a tutorial on modal popups that use constructors and inheritance without using jQuery plugins, more like a small tutorial on how to make a plugin that makes modal popups.
@TheChipBandit
@TheChipBandit 9 жыл бұрын
I think on 20:00 you forgot the brackets of the getname function,should have written person.getname(), Great vid,10x
@KhadijahCelestine
@KhadijahCelestine 10 жыл бұрын
I love live debugging!
@MrStimpy77
@MrStimpy77 11 жыл бұрын
36:50 is wrong. var myfunc = function() { .. }; .. and .. function myfunc() { .. } .. are actually the same in the JS runtime, and the 2nd *is* scoped to the closure, NOT globally, and it is still a variable, the only diff is that the 2nd shows up in a stack trace with its full name. Therefore, I recommend the latter when mid-block. The only reasons to perhaps avoid it are because it is not JSONable and less visually obvious that it is indeed a local variable. jsfiddle -dot- net /vzFT2/2/
@stepshashaydy
@stepshashaydy 10 жыл бұрын
Awesome! :)
@kuraibankusu
@kuraibankusu 10 жыл бұрын
Great vid thanks
@NosniborNitram
@NosniborNitram 11 жыл бұрын
Learnt more about debugging there. Thanks anyway
@sandeshsmagdum
@sandeshsmagdum 10 жыл бұрын
Thank Travis, I created a jsfiddle based on this presentation. The following is the jsfiddle URL: jsfiddle.net/sandeshsm27/3NHDE/
@ThijmenGThN
@ThijmenGThN 4 жыл бұрын
I never understood why people do: “let array = new Array”, isn’t it just easier to do: “let array = []” ?
@nicholasaurus
@nicholasaurus 9 жыл бұрын
I wish you wouldn't have called the element you are targeting 'context' that is incredibly confusing since context is also how people refer to 'this.'
@travist349
@travist349 11 жыл бұрын
The version of chrome should not matter since they all basically use the same Javascript engine.
@mohamedfaried3
@mohamedfaried3 11 жыл бұрын
too small text it is not visible it is a big mistake
@xavorTM
@xavorTM 10 жыл бұрын
Its PERDECTLY vissible
@stepshashaydy
@stepshashaydy 10 жыл бұрын
Alexander Dimitrov In full screen sure but most people like to type as they watch and in this case it's not possible.
@duiffie
@duiffie 3 жыл бұрын
... okay Trav ... you could be a welder ...
@edisomerovic3826
@edisomerovic3826 11 жыл бұрын
Who is this for? This is not for learning JavaScript. But for experienced developers who want to learn JavaScript. ???
@JustinGoldsmith
@JustinGoldsmith 11 жыл бұрын
It's funny your site is called allplayers but you only offer an iphone app. Cause if you own an Android device you're simply not a player. Thanks for the video, I'll use what I learned to build an Android app.
@AlibekKulseitov
@AlibekKulseitov 12 жыл бұрын
booooooring from 00:00 to 10:00. anyways very helpful
@olivercroomes
@olivercroomes 11 жыл бұрын
I didn't find your tutorial helpful. From a beginner perspective, it seemed you were throwing around jargon without going into much depth. I tried to go with the flow of your presentation, but when you derive a topic from something you lightly addressed, and then you constantly mess up, you can be very hard to follow. Keep this in mind if you make another video. I mostly scraped your video for topics that I thought I should learn (such as patterns).
Javascript Essentials (Revised)
1:16:11
Travis Tidwell
Рет қаралды 69 М.
JavaScript in Half an Hour (Without jQuery!)
31:52
LearnWebCode
Рет қаралды 859 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Introduction to JavaScript and Browser DOM
1:06:01
Google TechTalks
Рет қаралды 133 М.
Douglas Crockford: Really. JavaScript.
46:10
JSConf
Рет қаралды 81 М.
The Definitive Guide to Object-Oriented JavaScript
27:01
James Shore
Рет қаралды 306 М.
JavaScript Class OOP Tutorial Intro to Object Oriented Programming
21:04
AngularJS Fundamentals In 60-ish Minutes
1:10:50
Dan Wahlin
Рет қаралды 1,9 МЛН
Best of Fluent 2012: Maintainable JavaScript
47:05
O'Reilly
Рет қаралды 56 М.
JavaScript: The Good Parts
1:03:48
Google TechTalks
Рет қаралды 585 М.
Crockford on JavaScript - Act III: Function the Ultimate
1:13:29
YUI Library
Рет қаралды 181 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 443 М.