ES6 Tutorial #5: Array Destructuring in ES6 in JavaScript in Hindi 2020

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

ความคิดเห็น • 114

  • @ThapaTechnical
    @ThapaTechnical  4 ปีที่แล้ว +4

    Guys, program krna jarror n paste here, Check Here the complete Playlist ➡️ ECMAScript Tutorial in Hindi 2020: th-cam.com/play/PLwGdqUZWnOp19VX-DM4oHtmWhDfWblFh-.html
    ➡️ Advanced JavaScript in Hindi Playlist: th-cam.com/play/PLwGdqUZWnOp0hSGwasCjbrWSPrEKqB_kz.html&disable_polymer=true

  • @khansawidhani9899
    @khansawidhani9899 4 ปีที่แล้ว +9

    From Pakistan. Your videos are really informative and this one of course helped a lot when i was searching for destructuring in Urdu or Hindi. Finally caught you. Thanks and keep going on.

  • @VandanaSharma-ec6zl
    @VandanaSharma-ec6zl 2 ปีที่แล้ว +1

    thank you so much for taking birth . had u not been there i would have just been a person who wants to learn coding , but now i am a student of coding .. thank you so much .....my all blessings to you ..

  • @DEEPANSHU_NAG
    @DEEPANSHU_NAG 4 ปีที่แล้ว +17

    11:50 swap any two nos without using third variable
    let a = 5 , b= 10;
    a= a+b;
    b= a-b;
    a=a-b;
    console.log("value of a is " + a + "value of b is " + b);

    • @NadeemKhan-tv6jo
      @NadeemKhan-tv6jo 4 ปีที่แล้ว

      bro a-b is -5 then so this program return a = -5 and b = 20

    • @DEEPANSHU_NAG
      @DEEPANSHU_NAG 4 ปีที่แล้ว +1

      @@NadeemKhan-tv6jo *_SAHI H BRO THIK SE CALCULATE KRO OUTPUT IS a=10 AND b= 5_*

    • @631singh
      @631singh 4 ปีที่แล้ว +1

      @@DEEPANSHU_NAG
      use es6 usse or aache se ho jayga
      console.log(`value of a is: ${a} and value of b is : ${b} .`);

    • @DEEPANSHU_NAG
      @DEEPANSHU_NAG 4 ปีที่แล้ว

      @@631singh ✌🏻

    • @nasimreja7312
      @nasimreja7312 3 ปีที่แล้ว +4

      let a =5;
      let b =10;
      [a,b]=[b,a]
      console.log(a,b)

  • @sonuahluwalia756
    @sonuahluwalia756 4 ปีที่แล้ว

    sir awesome teaching big fan aap ka hu sabhi tutorial ,decent hai learnable hai easily understanding hai ,god bless you sir,

  • @zafarhussain8273
    @zafarhussain8273 4 ปีที่แล้ว +1

    boom guyz me sikh gya

  • @p.mousumipriyadarshini8677
    @p.mousumipriyadarshini8677 3 ปีที่แล้ว

    1 2 3 and boom guys😆😆
    btw the vdo was helpful👍

  • @divyanshjain7515
    @divyanshjain7515 3 ปีที่แล้ว +2

    Bro your explanation part is extremely good it really help new persons to understand how actually things work ....keep going and make new videos too will support you

  • @lalit00716
    @lalit00716 4 ปีที่แล้ว +1

    Thanks sir for explaining the think's so smoothly like piece of cake.before all stuff looking so hectic to learn but you make it easy for us.thanks once again please kindly makes video for ES7 as quickly as possible.

  • @royalbengal4590
    @royalbengal4590 ปีที่แล้ว

    Love you bro such a beautiful way to explain thank you for the support Bro Code

  • @AnkitNarwariya
    @AnkitNarwariya 3 ปีที่แล้ว

    Finally 300k Completed, Congratulations brother...

  • @mohsinrehman666
    @mohsinrehman666 ปีที่แล้ว

    Very very nice ❤🎉

  • @prash0202
    @prash0202 3 ปีที่แล้ว +2

    Sir, how this work for a large number of array elements? Please elaborate

  • @DEEPANSHU_NAG
    @DEEPANSHU_NAG 4 ปีที่แล้ว +2

    Awesome explanation 👏🏻

  • @AmeerHamza-jy5ml
    @AmeerHamza-jy5ml 4 ปีที่แล้ว +3

    [b,a]=[a,b] swapping through Destructing !!
    because sir i have a doubt sir which array you can use have only 5 five elements and we write 3 commas between them if we have so many elements like 100 or more in this situation what is the proper way to assign our last element value ???

  • @silkydiaries2395
    @silkydiaries2395 2 ปีที่แล้ว

    awesome explanation sir

  • @bajarangjadhav8432
    @bajarangjadhav8432 4 ปีที่แล้ว +4

    Hi, how can I get first and last element of array having dynamic length using method you explained ? thanks in advanced

  • @MubasshirMiraj
    @MubasshirMiraj 3 ปีที่แล้ว

    Amazing vedio

  • @mehtabmultani3194
    @mehtabmultani3194 4 ปีที่แล้ว +5

    // program to swap to two numbers w/o using 3rd variable
    let a = 15;
    let b = 43;
    [a, b] = [b, a];
    console.log(`a: ${a}`);
    console.log(`b: ${b}`);

  • @hello_sharma_ji
    @hello_sharma_ji 4 ปีที่แล้ว +1

    Agar mere array me 100 value hai or mujhe first and last value dikhani hai to kya mujhe 98 "," comma use karne honge?

  • @saadmanahmed860
    @saadmanahmed860 4 ปีที่แล้ว

    very good illustration

  • @kashifkhan-im4jc
    @kashifkhan-im4jc ปีที่แล้ว

    sir apne is mai kaha ke last waly element ko find karny se pehly lenght find karna hai agar hm ne length be find kya aur hamara array mai 1000 se be zyada element hai so ho we can write like thie let [ top1,,, toplast] yasha par tu ham 1k commas to nahi lek skty?

  • @prensudangol1547
    @prensudangol1547 ปีที่แล้ว

    You are god !

  • @muddusarzulfiqar1657
    @muddusarzulfiqar1657 4 ปีที่แล้ว

    Mashallah boohat acha samjaty ho bhai ap ak masla tha agar database sa koi array bna kay la rhy ha hm values or upto 1000 values a rhe ha to last one kay leya kaya hmm 999 comma lekhay gay ya kay koi or method hota????

  • @zafarhussain8273
    @zafarhussain8273 3 ปีที่แล้ว

    mind blowing sir

  • @mohsinhasan1153
    @mohsinhasan1153 4 ปีที่แล้ว

    thapa jani advance JS or ES6 same hai ya diffrance hai dono me..

  • @KarandeepKumar
    @KarandeepKumar 4 ปีที่แล้ว +1

    Sir ye jo bataya apne ki hum comma(,) dalkar array items ko separate kar sakte hai..par agar kisi array me suppose 100 items hai aur muje 100th item sirf chahie to muje 99 bar comma(,) dena prega kya ???

    • @bushranikhat2326
      @bushranikhat2326 4 ปีที่แล้ว +1

      Nhi aapko simply array[99] likhna hoga

  • @mohsinliaqat5442
    @mohsinliaqat5442 4 ปีที่แล้ว

    bht awla

  • @rajbannasa7662
    @rajbannasa7662 3 ปีที่แล้ว

    thank you so much sir

  • @MonikaKumari-er4de
    @MonikaKumari-er4de ปีที่แล้ว

    Thank you sir

  • @afzalmahmudd8365
    @afzalmahmudd8365 3 ปีที่แล้ว

    Thank you.

  • @ahmadfraz9715
    @ahmadfraz9715 3 ปีที่แล้ว

    Swaping two numbers:
    let a = 10;
    let b = 20;
    [a, b] = [b, a];
    console.log(`After Swaping a is: ${ a } and b is: ${ b } `);

  • @parveshkumar5470
    @parveshkumar5470 3 ปีที่แล้ว +1

    you use only 5 variables to find the first and last value in an array. If we have more than thousand values then how to find the first and last array value?

  • @aryankanani2381
    @aryankanani2381 4 ปีที่แล้ว

    Good Contents

  • @ashishthakkar350
    @ashishthakkar350 3 ปีที่แล้ว

    yadi 1000 data or usme hame 1st, 25th,38,93, and last data chahiye to kya krna hoga to kitne comma ka use krna hoga to fir uska kya krna hoga

  • @631singh
    @631singh 4 ปีที่แล้ว

    let a=10;
    let b=5;
    a=a+b;
    b=a-b;
    a=a-b;
    alert(`after swapping value will be a : ${a} and value of b : ${b}`);

  • @susandanne3107
    @susandanne3107 4 ปีที่แล้ว

    instead of const can write let while declaring array details

  • @saurabrakshit405
    @saurabrakshit405 3 ปีที่แล้ว +1

    what if I have thousands of elements in the Array , do I have to use comma 999 times?

  • @Callme_Dee.
    @Callme_Dee. 3 ปีที่แล้ว

    do you have any refrence video for anonymous fuctions, IIFE, fiter , map& reduce...please share

    • @ThapaTechnical
      @ThapaTechnical  3 ปีที่แล้ว

      just watch JavaScript in 16+hrs video of mine.. You will find evryting

    • @Callme_Dee.
      @Callme_Dee. 3 ปีที่แล้ว

      @@ThapaTechnical ok i ll check thanks..and one more doubt for {...} rest opertor in object destructuring. any refrence ?? i checked your ES6 object destructuring video its not there

  • @kushagragautam3979
    @kushagragautam3979 4 ปีที่แล้ว +1

    array ka size na pta ho to ? matlab arry me values dynamically backend se aa rhi hon to destructuring kaise karenge ?

  • @zargamhussain5481
    @zargamhussain5481 2 ปีที่แล้ว

    I only want "last wala variable" ye badiya tha 😅

  • @pratikkamble1770
    @pratikkamble1770 ปีที่แล้ว

    Suppose I have 100 elements in my array
    To kya muze 98 commas lagane padhenge to get 1st n last element of array using this method? This is so headache

  • @easytocoding9863
    @easytocoding9863 4 ปีที่แล้ว

    let a,b=5,10;
    b,a=a,b
    Or
    a=a*b
    b=a/b
    a=a/b
    Or
    a=a+b
    b=a-b
    a=a-b
    Ye code bhi work karega maine socha ki add aur minus ke alawa new answer du

  • @bhautikvachhani8342
    @bhautikvachhani8342 ปีที่แล้ว

    Fabulous

  • @ravishmukkar6955
    @ravishmukkar6955 4 ปีที่แล้ว +1

    sir please make a video on geo location html5

  • @chaqdas5972
    @chaqdas5972 ปีที่แล้ว

    but agar,array ki values zyda ho kasy pata chala ga ky total kitna comaa ana hai?????????

  • @programming_skills384
    @programming_skills384 3 ปีที่แล้ว +1

    If we have 1000 items of array than how will handle that comma,.

  • @yogeshkumargupta265
    @yogeshkumargupta265 4 ปีที่แล้ว

    This is not included in the Advanced tutorial playlist.. please add this video there also

  • @hhtcp015
    @hhtcp015 4 ปีที่แล้ว

    let a=5;
    let b=10;
    a = a+b;
    b = a-b;
    a = a-b;
    console.log(a);
    console.log(b);

  • @AnkitncrVlogs
    @AnkitncrVlogs 2 ปีที่แล้ว

    let a = 10;
    let b = 20;
    a = a + b;
    30
    b = a -b;
    10
    a = a-b;
    a = 20; b= 10;

  • @ravinayadav9539
    @ravinayadav9539 4 ปีที่แล้ว

    let a = 5;
    let b = 10;
    a = b ;
    b = a - 5;
    console.log(`value of a is ${a}, value of b is ${b}`);

  • @himanshijain7174
    @himanshijain7174 4 ปีที่แล้ว

    why you always use const for declaring variable or array, cant we use let?

  • @InfoPlus4all
    @InfoPlus4all 4 ปีที่แล้ว +1

    sir, train status ki api per video banadain. pls

  • @pk-pm5is
    @pk-pm5is 4 ปีที่แล้ว +1

    what is java

  • @tannuyadav5543
    @tannuyadav5543 4 ปีที่แล้ว

    Sir ek problem hai xampp pe login registration form work Kar raha hai but hosting pe nahi Kar raha hai

    • @hello_sharma_ji
      @hello_sharma_ji 4 ปีที่แล้ว

      Index find karna hoga with hardcore no.

  • @devbyishtiaq
    @devbyishtiaq 4 ปีที่แล้ว

    Please make a video on youtube and facebook downloader script in php for any website

  • @rajendrakumar-qt3ef
    @rajendrakumar-qt3ef 4 ปีที่แล้ว

    Sir php framework par video banayi like laravel. Codegniter

  • @sunnyvlogs__
    @sunnyvlogs__ 3 ปีที่แล้ว +1

    By using XOR operation three times.

  • @abhishektripathi3707
    @abhishektripathi3707 4 ปีที่แล้ว

    ####boom guys

  • @Dineshkumar-ic5el
    @Dineshkumar-ic5el 8 หลายเดือนก่อน

    let a = 5;
    let b = 6;
    a= a+b;
    b= a-b;
    a= a-b;
    that's it.

  • @md.shehabuddintushar1816
    @md.shehabuddintushar1816 3 ปีที่แล้ว

    let a=5; let b=10;
    [a,b]=[b,a]
    console.log(a)
    console.log(b)

  • @rohitvora54
    @rohitvora54 4 ปีที่แล้ว

    let A = 25;
    let B = 50;
    [A,B] = [B,A];
    console.log("A = " + A);
    console.log("B = " + B);

  • @rishabhchaurasia4138
    @rishabhchaurasia4138 4 ปีที่แล้ว +1

    Thapa Sir ES6 pura complete kijiye taaki apne resume me daal kar interview de saku

  • @ravishmukkar6955
    @ravishmukkar6955 4 ปีที่แล้ว

    please sir make a tutorial to make visitor counter in php

  • @nishantsethi6625
    @nishantsethi6625 3 ปีที่แล้ว +1

    var a=5
    var b=10
    var b=(b-a)
    var a=(a+b+b)-a
    console.log(a,b);

  • @pradipchetry4261
    @pradipchetry4261 ปีที่แล้ว

    We can also use this method to access last item of an array from a list
    let lastItem = myprolang [myprolang.length - 1];
    console.log(lastItem)

  • @geekylearner3596
    @geekylearner3596 3 ปีที่แล้ว

    //SWAPPING OF TWO NUMBERS WITHOUT THIRD VARIABLE
    let a = 4,
    b = 5;
    console.log(`Before swapping a is ${a} and b is ${b}`);
    a = a + b;
    b = a - b;
    a = a - b;
    console.log(`After swapping a is ${a} and b is ${b}`);

  • @chizuru1999
    @chizuru1999 4 ปีที่แล้ว +1

    Task
    let [b, a] = [a, b]

  • @mdshahnawaz645
    @mdshahnawaz645 11 หลายเดือนก่อน

  • @shahrukhshah3572
    @shahrukhshah3572 4 ปีที่แล้ว

    How to search for a number or string or a boolean value from an array and print it, can anyone help.?
    const arr=['John' , 23 , true]

  • @dumptruck3354
    @dumptruck3354 ปีที่แล้ว

    const arr = [5, 10];
    let [a, b] = arr;
    [a, b] = [b, a];
    console.log([b, a]);

  • @ahmadfraz9715
    @ahmadfraz9715 3 ปีที่แล้ว

    Program:

  • @hasbullakhan83
    @hasbullakhan83 4 ปีที่แล้ว

    What is the real purpose of array destructuring? Why would anyone destruct an array? As far as i can see es6 making the process worse. In the example he used a simple array of 5 elements but when its larger its completely not feasible.

    • @mustaquekhan4255
      @mustaquekhan4255 2 ปีที่แล้ว

      The major use of array destructuring is to return an array inside a function and get those returned array values in individual varibales.
      function func( ) {
      return [''Js", 200];
      }
      let[ numb1, numb2 ] = func( );
      console.log(numb1);
      console.log(numb2);
      OUTPUT:
      Js
      200

  • @gopalsinghchampawat4328
    @gopalsinghchampawat4328 4 ปีที่แล้ว

    सारा कंसोल पे लोड हो रहा है, क्रिपया एचटीएमएल पेज पर लोड करना बताएं।

  • @websikhao485
    @websikhao485 4 ปีที่แล้ว

    swap two numers without using third number ,solution using array destructing:
    const names=['Muhammad nauman','nasir','SE'];
    let[value1,,value2]=names;
    [value1,value2]=[value2,value1];
    console.log(`My name is = ${value1} and degree is ${value2}`);

  • @aamirsaleem2213
    @aamirsaleem2213 4 ปีที่แล้ว

    osm

  • @prashantkaushik6534
    @prashantkaushik6534 4 ปีที่แล้ว

    सर में एक वेबपेज बनाया हू JavaScript se। TH-cam जैसा
    पर वीडियो चलाने पर दूसरा वीडियो भी चलता रहता है दूसरा वीडियो स्टॉप केसे करूं ये समछ में नहीं आ रहा है।
    Please help me sir.....😟
    Thanks

  • @sabkuch1750
    @sabkuch1750 4 ปีที่แล้ว

    let x= 2;
    let y= 4;
    x = x+y;
    y= x-y;
    x= x-y;
    console.log(x);
    console.log(y);

  • @vijaykatake4778
    @vijaykatake4778 11 หลายเดือนก่อน

    b = b-a;
    a=a+a;

  • @notuzzi
    @notuzzi ปีที่แล้ว

    3 2 1 pilleyy

  • @techdreams6748
    @techdreams6748 3 ปีที่แล้ว

    Bro why you teach your concept of JS is so weak

  • @win8564
    @win8564 2 ปีที่แล้ว

    stop doing this boom boom please

  • @goodpanda4082
    @goodpanda4082 3 ปีที่แล้ว

    stop saying boom

  • @rajbannasa7662
    @rajbannasa7662 3 ปีที่แล้ว

    thank you so much sir

  • @vikassingh1628
    @vikassingh1628 2 ปีที่แล้ว

    let a = 1;
    let b = 2;
    a = a*b;
    b = a/b;
    a = a/b;
    console.log(a);
    console.log(b);

  • @yasinshaikh9823
    @yasinshaikh9823 2 ปีที่แล้ว

    let a=5; let b=10; b=(b-a); console.log(b); a=(b+a); console.log(a);