Constructor as a Class in JavaScript (Hindi)

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024
  • Constructor as a Class in JavaScript
    You can find out our HTML Complete Video tutorials :
    goo.gl/O254f9
    CSS Complete Video Tutorial Playlist:
    goo.gl/On2Bh1
    Feel free to share this video
    JavaScript Complete Video Tutorial Playlist
    goo.gl/A517jQ
    Check Out Our Other Playlists:
    / geekyshow1
    SUBSCRIBE to Learn Programming Language !
    goo.gl/glkZMr
    Learn more about subject:
    www.geekyshows....
    __________________________________________________________
    If you found this video valuable, give it a like.
    If you know someone who needs to see it, share it.
    If you have questions ask below in comment section.
    Add it to a playlist if you want to watch it later.
    ___________________________________________________________
    T A L K W I T H M E !
    Business Email: contact@geekyshows.com
    RUclips Channel: / geekyshow1
    Facebook: / geekyshow
    Twitter: / geekyshow1
    Google Plus: plus.google.co...
    Website: www.geekyshows....
    ___________________________________________________________
    Make sure you LIKE, SUBSCRIBE, COMMENT, and REQUEST A VIDEO :)
    ___________________________________________________________

Комментарии • 26

  • @iamdanyaal
    @iamdanyaal 3 года назад +1

    Thank You Sir

  • @MegaRonnie2
    @MegaRonnie2 3 года назад +1

    You rock man.

  • @RakeshKumar-lg4vp
    @RakeshKumar-lg4vp 4 года назад +2

    what will happen if we don't give this keyboard with all instance variable , i mean var Mobile = function(m, s) { model = m; sp = s} ;

  • @jagdishjena9058
    @jagdishjena9058 5 лет назад +1

    Thank u so much sir

  • @aryankhandelwal15
    @aryankhandelwal15 3 года назад

    very simplified tuts thanks

  • @kajalkashyap4068
    @kajalkashyap4068 5 лет назад

    Thanks for this video 😊

  • @codeword1712
    @codeword1712 Месяц назад

    BHAI PLAYLIST KI NUMBERING KRO DOWMLOAD KRTE HAI TO DIKKAT AATI HAI SEQUENCE SMJ NE ME

  • @sachingoel9866
    @sachingoel9866 3 года назад +1

    I get Type error :"Mobile is not a constructor"
    when I using this code with arrow function
    var Mobile = (model)=> {
    this.model = model;
    }
    var nokia = new Mobile(3310)

    console.log(nokia.model)
    but if I am using the same code with function (mdoel){} it is giving me right output.
    Why please anyone or geeky show assist.

    • @sam-001
      @sam-001 2 года назад +1

      Same problem

  • @Niamat-w9s
    @Niamat-w9s 6 лет назад +1

    thanks

    • @sawaimalhi8439
      @sawaimalhi8439 6 лет назад +1

      Constructor as a Class

      //Constructor as a Class
      /*
      javascript k ander sirf object ka object create krte
      hain
      javascript k ander class nhe hote wo hum samjany k
      liye kehte hain
      */
      //ye hai object par as class hum use kr rhy hain
      var Mobile = function (model_no,sprice){
      this.model=model_no;
      this.color='white';
      this.price=300;
      this.sp=sprice;
      //is ko method kehte hain
      this.sellingprice=function(){
      return(this.price + this.sp);
      };
      this.data=function(){
      document.write("Model no:" +
      this.model +"price :"+
      this.sellingprice());
      }
      };
      var samsung = new Mobile('galxy',2000);
      var nokia = new Mobile('3145',2000);
      nokia.data();

  • @ddepressant
    @ddepressant 4 года назад +2

    you are saying that there is no class in JS but yet you are explaining about class in JS.....can you please elaborate?? :)

    • @geekyshows
      @geekyshows  4 года назад +1

      This is illusion. just to give programmer easy of work. Behind the scene all are same. I have already answered this question in a video.

  • @waqarahmed1671
    @waqarahmed1671 4 года назад

    bro constructer wali videos boht confuse kr rahi hain i don't know why

  • @syedularif2421
    @syedularif2421 5 лет назад

    Thanks a loooooooooooooooooooooooooooooooooooooooooooooooot

    • @detector_aryan
      @detector_aryan 3 года назад

      Thanks a looooooooooooooooooooooooooooooooooooooooooot

  • @mohammedgazali6250
    @mohammedgazali6250 4 года назад

    var Student01 = function(name) {
    this.names = name;
    this.age = 18;
    this.class = 12;
    this.details = function() {
    return(this.age+this.class);
    };
    }
    var rollNo1 = new Student01("rohan");
    rollNo1.details();
    not working

    • @ankursinha129
      @ankursinha129 4 года назад

      This. Age+" " +this.class
      Return statement mein error hai

    • @mohammedgazali6250
      @mohammedgazali6250 4 года назад

      @@ankursinha129 sahi kaam kr rha hai. maine document.write(rollNo1.details()); kr k nhi dekha tha isliye mujhe output nhi mila tha.

    • @ankursinha129
      @ankursinha129 4 года назад

      Ok bhai Maine bs space lga diya lol sry.

    • @elect.avinash
      @elect.avinash 3 года назад

      @@mohammedgazali6250 😂😂

  • @saarthitraders
    @saarthitraders Год назад

    current time class aa gaya hai JavaScript me

    • @raj_patel
      @raj_patel 9 месяцев назад

      Classes were introduced in ECMAScript 2015, also known as ES6, which was released in June 2015.

  • @avkexpress8029
    @avkexpress8029 6 лет назад +2

    OWSM SIT G

  • @debarshi577
    @debarshi577 4 года назад +1

    abhi jo aap bata rehe hai,,,aap ko khud acche se nahi pata........................itna mera gurenty hai.