Static Methods in JavaScript Tutorial : Object Oriented Programming Series - Part 11

Поділитися
Вставка
  • Опубліковано 18 вер 2017
  • JavaScript Static Class Methods.
    Article and code samples from this tutorial
    * techsith.com\
    Please be my patreons on patreaon
    * / techsith
    Follow me for technology updates
    * / techsith
    * / techsith1
    Help me translate this video.
    * ua-cam.com/users/timedtext_vide...
  • Наука та технологія

КОМЕНТАРІ • 66

  • @andrerothweiler9191
    @andrerothweiler9191 5 років тому +41

    More I learn JS, more I realize I don't know JS.

    • @Techsithtube
      @Techsithtube  5 років тому +7

      That realization is very important so that you can learn JavaScript more.

    • @afterthetech4757
      @afterthetech4757 5 років тому +2

      More I learn JS, more I realize Python is way more reasonable :D

  • @homestarflyerify
    @homestarflyerify 6 років тому +8

    I've watched many of your videos now. I think you are one of my favorite UA-camrs. You break things down to bare metal and teach with pricision. Thank you.

  • @AMAN12855
    @AMAN12855 4 роки тому +2

    Finally! I was able to understand the static method in JS. Thanks, Sir! Awesome explanation.

  • @MylesGmail
    @MylesGmail 5 років тому +3

    This channel is one of the best

  • @werlloo
    @werlloo 3 роки тому

    I really appreciate the video. You defined everything clearly and gave examples that helped me understand what static is and when to use it. Thank you!

  • @craigburton4447
    @craigburton4447 3 роки тому

    That Object.assign shortcut... brilliant

  • @liudmylabarabash9839
    @liudmylabarabash9839 5 років тому +1

    Thanks a lot! You helped me understand static methods!

  • @SKU009
    @SKU009 6 років тому +5

    You are a very good teacher. Your videos are awesome.

  • @gabrielgaroz9348
    @gabrielgaroz9348 5 років тому

    Really good explanation! Will be checking more videos from you.

  • @rdwaller
    @rdwaller 4 роки тому

    I find your videos very useful. Well done.

  • @DanTran-uv3rg
    @DanTran-uv3rg 3 роки тому

    auto subscribed for amazing explanation of this subject

  • @umairsaleem6807
    @umairsaleem6807 6 років тому

    Nice Videos . Very helpful

  • @kttalkZ
    @kttalkZ 6 років тому +1

    You seem to absorb topics well and also produce the content. Cheers brother

  • @sudeepparchure
    @sudeepparchure 6 років тому

    Thanks man...

  • @1988proxy
    @1988proxy 4 роки тому +2

    techsith Tank you for this lesson!!!

  • @radoslavtsanev6822
    @radoslavtsanev6822 3 роки тому

    Great explanation! Is it a good practise to have many static methods/properties if you dont need in the instance of the class ?

  • @yadusolparterre
    @yadusolparterre 5 років тому

    what is the use of static methods, apart from polluting your memory?

  • @hmalintsyan6360
    @hmalintsyan6360 4 роки тому

    great! great! great!

  • @TheQuestion0mark
    @TheQuestion0mark 6 років тому

    really love your video. hope to have time to translate to hebrew for future ppl

    • @Techsithtube
      @Techsithtube  6 років тому

      Thank you very much for considering . Looking forward to the hebrew translation. :)

  • @ruchirai5775
    @ruchirai5775 5 років тому +1

    simplest explanation Just wow, can u please make video on Mobex, rxjs , javascript mostly used design patterns and subscribers observer

    • @Techsithtube
      @Techsithtube  5 років тому

      I do have a plan for Mobex videos and design patterns

  • @TheAppAlchemist
    @TheAppAlchemist 4 роки тому

    nice

  • @anujtaxali
    @anujtaxali 5 років тому

    Why create a static method in the Car class vs. just a regular function in the global scope that does the same thing?

    • @Techsithtube
      @Techsithtube  5 років тому

      Defining something in global scope affects everything. Also if you have a class as a separate library. and you use it in a different project the static method will still be available base its part of the class.

  • @CulbuleBoys
    @CulbuleBoys 6 років тому +2

    your lectures are really helpful. Can u please create course on AngularJS

    • @Techsithtube
      @Techsithtube  6 років тому +1

      Thanks for watching :) I am working on agular JS series right now. I will have it ready in about 15 days.

  • @carloseduardogomezlozano491
    @carloseduardogomezlozano491 3 роки тому

    Good morning, please ask the following question: can the class have a variable or a constant? For example let auto = Class Car {...}. is that correct?. Tanks for your answer.

  • @user-zb5jp4ti1d
    @user-zb5jp4ti1d 6 років тому

    hi Hemil, great video. thanks so much. i have a query. you say that static/class methods are like utility functions. what does that mean.. im basically trying to undrrstand why do we need these static classes... what is it that they are providing that we cant accomplish with instance classes.

    • @Techsithtube
      @Techsithtube  6 років тому +1

      think of them as usb charger in your car. its helps you charge your cell phone whil you are in the car. but its not require as a part of the function of running a car. It doesnt affect any driving functions. make sense?

    • @user-zb5jp4ti1d
      @user-zb5jp4ti1d 6 років тому

      techsith yes.. that analogy makes sense... so what wld be a practical usecase of static methods... also, are static methods just syntactic sugar... if so, what are these static methods under the hood... thanks

    • @Techsithtube
      @Techsithtube  6 років тому

      First of all they are not added to prototpye of the class like instance methods. and they are not available to instances. so they are bit unique in that sense.

  • @yasirkaram
    @yasirkaram 5 років тому

    Why DRY in repeating same static method sellCar() again in subclass? can't we just call it from superclass?

    • @Jaavv
      @Jaavv 5 років тому

      polymorphism

  • @mortkebab2849
    @mortkebab2849 3 роки тому +1

    There's no playlist for this series. How am I supposed to find the first video?

    • @msnfsn754
      @msnfsn754 2 роки тому

      ua-cam.com/play/PL7pEw9n3GkoW0ceMeoycg9D00YjPAbtvt.html

  • @user-of3xm7sv5g
    @user-of3xm7sv5g 5 років тому

    Hi Tech, could you please try to answer my question. I understand that this question isn't below to this video. But how can I make static audio frequencies in canvas using JS or React?

    • @Techsithtube
      @Techsithtube  5 років тому

      you want to create audio frequencies? like waves painted on canvas ?

    • @user-of3xm7sv5g
      @user-of3xm7sv5g 5 років тому

      @@Techsithtube yes, like in soundcloud but I don't want to use wavesurfer for this taks

  • @seenuvasanv
    @seenuvasanv 6 років тому +1

    Awesome,
    let me:
    1) static method can be call on class. - Toyota.sellCar
    2) static method have object/instance as argument - Toyota.sellCar(camry)
    3) static method don't have "this"
    -Thank you.

    • @Techsithtube
      @Techsithtube  6 років тому +1

      Yes. you got it :)

    • @dayvie9517
      @dayvie9517 5 років тому

      Static method can have context bound to them and therefore have a "this".

  • @ollehbudiak7150
    @ollehbudiak7150 4 роки тому

    console.log(`Toyota ${car.price}`); //because inside static method no 'this' or 'super'
    vs
    console.log(`Toyota ${super.price}`);

  • @deepshikhasahni2671
    @deepshikhasahni2671 6 років тому

    awesome lectures..when you are going to launch a course on udemy?

    • @Techsithtube
      @Techsithtube  6 років тому

      I am actually working on it. Might take few months for that.

    • @vinodhkumar457
      @vinodhkumar457 6 років тому

      techsith waiting for your course on udemy.

    • @eldhosevj9924
      @eldhosevj9924 4 роки тому

      His course is available udemy

  • @CristianRomero-up1nj
    @CristianRomero-up1nj 6 років тому

    But, what's the point with the static method? Why should I set a method in the static way?

    • @Techsithtube
      @Techsithtube  6 років тому

      Static methods are used as utilities for classes.

  • @rakeshpatidar4426
    @rakeshpatidar4426 6 років тому

    It's super +1

  • @gabrielfono844
    @gabrielfono844 4 роки тому

    sir
    do you have a React course??/
    I found it everywhere online but couldn't see it.
    you might not have it
    I am not sure.
    you are freakin good good good good good instructor.
    thannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnks

    • @Techsithtube
      @Techsithtube  4 роки тому

      Yes I have the react course, its on my channel description .

  • @urdustoriespoetrycollectio976
    @urdustoriespoetrycollectio976 6 років тому +1

    I have a question please.
    How to become a full Stack web developer? And JavaScript expert?

    • @Techsithtube
      @Techsithtube  6 років тому +2

      Full stack means (JavaScript + css + html ) + ( Back-end Expertise ). You have to pick on of the back-end languages like java, c++, python or node. I would suggest to go with node since its also JavaScript so bit easier.

    • @urdustoriespoetrycollectio976
      @urdustoriespoetrycollectio976 6 років тому

      techsith thanks brother.
      You're JavaScript tutorials are awesome.
      Love it 😍

  • @easy-stuffs
    @easy-stuffs 5 років тому +1

    Hit like if u figured out that it Shud be "car.price" instead of "this.price" and waiting for the error on console :P

  • @lgrchannel766
    @lgrchannel766 5 років тому

    this is wrong is class is existed in javascript

    • @Techsithtube
      @Techsithtube  5 років тому

      Yes, JavaScript has classes. Its been there for atleast few years, It was introduced in ES6. If you have used any modern JS framework you would have used classes.