THIS keyword - Beau teaches JavaScript

THIS keyword - Beau teaches JavaScript

freeCodeCamp.org

7 лет назад

58,474 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@namangupta1817
@namangupta1817 - 13.04.2017 20:57

can anyone tell me why i am getting o.f() is undefined instead of value 8 ??

Ответить
@AwB
@AwB - 25.05.2017 08:00

Great stuff

Ответить
@irfansindhi5091
@irfansindhi5091 - 18.08.2017 14:40

Just stop clicking

Ответить
@grandpowr
@grandpowr - 12.09.2017 01:28

I understood because I read the book You Don't Know Javascript, but I think you should slow down a bit for newer people, otherwise I found it well made, really love this series you're doing.

Ответить
@rmb1831
@rmb1831 - 23.10.2017 17:23

Complicated example. Must use easy to understand parameters.

Ответить
@threeone6012
@threeone6012 - 04.11.2017 01:26

Great upload!

Ответить
@christianrodier3381
@christianrodier3381 - 10.11.2017 05:26

This is very helpful thanks

Ответить
@markodjuric3905
@markodjuric3905 - 20.11.2017 02:23

Thanks for this!

Ответить
@core_dump
@core_dump - 17.01.2018 23:31

Great info! Understanding core JavaScript is so important... its more important than learning frameworks.

Ответить
@Doda100creative
@Doda100creative - 29.01.2018 05:25

This video could save a whole day wasted in 8 minutes

Ответить
@redouanemahjoubi1914
@redouanemahjoubi1914 - 20.03.2018 02:53

what program are u using ?

Ответить
@beccaarauz
@beccaarauz - 30.03.2018 23:44

for someone who's starting in JS this video was very fast, I find it a little hard to understand.

Ответить
@shankerm3959
@shankerm3959 - 30.06.2018 04:57

Thank you, but you need to slow down much more. I kept getting lost and eventually stopped at the half-way point.

Ответить
@terrancekent7887
@terrancekent7887 - 08.07.2018 20:44

Slow down & get a new mouse lol. But thanks for the help.

Ответить
@Azim2562
@Azim2562 - 23.07.2018 15:30

thanks

Ответить
@manas_singh
@manas_singh - 07.12.2018 11:49

Excellent explanation, I loved it

Ответить
@nowyouknow2249
@nowyouknow2249 - 05.01.2019 10:50

Bad way to teach.
I had to stop the video halfway to avoid complications.
Slow down and put the learner in mind next time.

Ответить
@mdabutalha3165
@mdabutalha3165 - 16.01.2019 21:40

short time best explanation.

Ответить
@justinherrera6790
@justinherrera6790 - 01.04.2019 07:54

too fast, too advance. your reference is mdn and I thought that this video will give me a best explanation but I was wrong

Ответить
@perfectigbadumhe113
@perfectigbadumhe113 - 03.10.2019 17:53

Didn't understand sheet

Ответить
@ww4102
@ww4102 - 06.10.2019 01:39

If you listen very carefully, the first 14 seconds explain a lot! " The value of 'this' when used in a function, is the object that owns the function"

Ответить
@stocktrade9655
@stocktrade9655 - 08.11.2019 18:06

this tutorial is so confusing

Ответить
@raywillaimjhonson
@raywillaimjhonson - 16.11.2019 05:27

The more I try to understand "this" the more my brain wants to fall out of my head.

Ответить
@gabrielsoloman5000
@gabrielsoloman5000 - 05.12.2019 00:11

great lesson!

Ответить
@KL4NNNN
@KL4NNNN - 04.01.2020 16:19

worst among the most incompetent people who tried to explain this.

Ответить
@TheLoniard
@TheLoniard - 07.01.2020 00:49

Eureca! Thank you for this movie. I have got it!

Ответить
@Andrei-xb1pz
@Andrei-xb1pz - 01.03.2020 16:17

Yes it was fast, but there is a pause button for that. Thanks for explaining THIS in its various contexts. It's not the definite guidebook, but it was very helpful to me!!!

Ответить
@awekeningbro1207
@awekeningbro1207 - 20.03.2020 14:05

This was confusing.

Ответить
@AgrabATC
@AgrabATC - 18.04.2020 01:02

Worse explanation ever! It confused me more.

Ответить
@curiousindividual634
@curiousindividual634 - 19.04.2020 08:27

you haven't answered the main question: Why TF do we need "this" in the first place? It does absolutely nothing. Is it some sort of inside joke?

Ответить
@josemaribautista7552
@josemaribautista7552 - 16.06.2020 00:08

thanks but i hate it

Ответить
@Briton9
@Briton9 - 16.06.2020 14:03

THIS is bullshit

Ответить
@abdelkrimeljaouhari2370
@abdelkrimeljaouhari2370 - 26.06.2020 18:49

You have not simplified the issue ,but thank you for the video <3.

Ответить
@GraceandWisdom
@GraceandWisdom - 02.08.2020 10:29

I really would like to grasp these concepts, but it seems as though JavaScript is some sort of 'bottomless pit' of information that cannot be explained in a simplistic terminology. Thereby leaving a beginner unsure about what one learns.

Ответить
@hashtagtrends9886
@hashtagtrends9886 - 11.08.2020 21:44

Thank you!

Ответить
@ShoSidney
@ShoSidney - 06.11.2020 18:23

most confusing tutorial...

Ответить
@Azar211
@Azar211 - 06.01.2021 05:25

Many thanks for this serious video about the subject far away from the "hello world" ones , one should be concentrated , stop and replay to get the best of the video , thank you again

Ответить
@aalez1983
@aalez1983 - 15.03.2021 12:33

those mouse clicks are so loud I had to stop 1 minute in the video because it's distracting from the subject

Ответить
@ZooDinghy
@ZooDinghy - 08.04.2021 08:01

JavaScript is disgusting. Utterly disgusting!

Ответить
@novanoskillz4151
@novanoskillz4151 - 22.07.2021 17:51

this has to be the least beginner friendly tutorial on the subject. I feel like I have to be a brain surgeon to follow along.

Ответить
@sevakk.939
@sevakk.939 - 24.10.2021 10:52

great, great, great

Ответить
@VanHaleNNoodle
@VanHaleNNoodle - 18.11.2021 22:13

When Beau says 'Created' about O (When talking about arrow functions around minute 7), does created mean when it is first called ?
Intuatively, I would have thought, it was created in the O object.

Ответить
@nehagavali9416
@nehagavali9416 - 13.04.2022 13:45

Which editior are you using

Ответить
@gustavokuthumy404
@gustavokuthumy404 - 13.06.2022 05:01

My head spinned the 1st time I watched, but I could I understand it in the 2nd run. Thanks!

Ответить
@freyjaaldebaran7275
@freyjaaldebaran7275 - 16.08.2022 12:15

Lmao i thought i had understood but then i read the comments and obviously i didn´t understand

Ответить
@DomedIsDoomed
@DomedIsDoomed - 06.10.2022 01:09

Loving this video

Ответить
@inononeeee
@inononeeee - 29.05.2023 14:00

Ответить
@GabeDStudios
@GabeDStudios - 13.10.2023 22:29

Let me re-arrange some sections to make it a bit clearer and beginner friendly:


var o = {a: 1, b: 3};

function add(c, d) {
return this.a + this.b + c + d;
}

console.log(add.call(o, 5, 7));
console.log(add.apply(o, [10, 20]));


It's good practice to declare all your variables and values first before any functions and by doing this, it becomes easier to read.
Here we create an object with two properties which is "a and b". "a" set to 1 and "b" set to 3.
"this.a" and "this.b" is pointing to the properties of the variable "o".
apply and call are METHODS for the "this" keyword, think of them as attachments for your gun that enables it to do other stuff.
the rest should be self explanatory if you studied the basics well. If not, gotta go back to start, you might have missed a few lessons.

Ответить
@CharlesGreene-n6t
@CharlesGreene-n6t - 31.01.2024 06:22

Let’s be real, Beau is an autistic boi who never got laid, that’s why hes a giga Chad penguin0 level coder. Yeah SURE he’s never said the N word EVER! And I’ve NEVER shite golden nuggets LMAO! 🤣 I’m Irish like LIKY!

Ответить