ES6 Tutorial #5: Array Destructuring in ES6 in JavaScript in Hindi 2020
HTML-код
- Опубликовано: 16 сен 2024
- Welcome, we will see Array Destructuring in ES6 in JavaScript in Hindi. ES6 Array Destructuring explained. The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.
➡️ ECMAScript Tutorial in Hindi 2020: • Modern JavaScript ES6 ...
➡️ ES5 & ES6 | ECMAScript 6 in One Video in Hindi: • ES5 & ES6 | ECMAScript...
➡️ JavaScript Game Development Series in 2020: • JavaScript Game Develo...
➡️ Source Code Link: www.thapatechn...
➡️ Top 5 Programming Languages in 2020: • Top 5 Programming Lang...
Check Here ➡️ Advanced JavaScript in Hindi Playlist: • Advanced JavaScript Tu...
➡️ Ludo Game JavaScript Link: • JavaScript Game in Hin...
➡️Plz show some love to My Siter RUclips Channel and Plz Subscribe Link: / @mayabeautyvlogs878
**************** MUST WATCH VIDEOS *****************
➡️ How to become a Full Stack Developer 2020: • How to become a Full S...
➡️ How To Become a Web Developer 2020: • How To Become a Web De...
➡️ How JavaScript Works: • How JavaScript Works i...
➡️ Follow me on Instagram: / vinodthapa55
************ Must Watch Videos For Web Development.************
➡️ HTML in One Video: • Learn HTML in One Vide...
➡️ CSS in One video: • Learn Complete CSS In ...
➡️ CSS FlexBox in 30 Minutes: • CSS FlexBox in 30 Minu...
➡️ JavaScript in One video: • JavaScript in One Vide...
➡️ ECMAScript 6 in One Video : • ES5 & ES6 | ECMAScript...
➡️ HTML5 in one video: • HTML5 Tutorial in One ...
➡️ CSS3 in one video: • Learn Complete CSS3 In...
➡️ Bootstrap4 in One video: • Bootstrap 4 in One Vid...
➡️ Jquery in One video: • jQuery in One Video in...
➡️ JSON in one video: • JSON in One Video in H...
➡️ ReactJS in one video: • ReactJS For Beginners ...
➡️ PHP in One Video: • PHP TUTORIAL IN ONE VI...
➡️ NodeJS in one video: / ipnwakoibt
➡️ MySQL in one video: • Complete SQL & MySQL i...
Make Website Responsive Using Media Queries in One Video in Hindi | Web Design Tutorial in Hindi
➡️ Link: • Make Website Responsiv...
DONATION FOR SUPPORT: PhonePay = vinodbahadur@ybl GooglePay: vbthapa55@oksbi
Believe me, all this money will be used to make more quality videos and to make my channel grow. So that I can always provide you awesome free videos :)
Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.
Don't Forget to Follow me on all Social Network,
Website Link: www.thapatechn...
Instagram Link: / vinodthapa55
Facebook Link: / vinodthapa55
Twitter Link: / vb55thapa
Facebook ThapaTechnical Page Link: www.facebook.c...
Guys, program krna jarror n paste here, Check Here the complete Playlist ➡️ ECMAScript Tutorial in Hindi 2020: ruclips.net/p/PLwGdqUZWnOp19VX-DM4oHtmWhDfWblFh-
➡️ Advanced JavaScript in Hindi Playlist: ruclips.net/p/PLwGdqUZWnOp0hSGwasCjbrWSPrEKqB_kz&disable_polymer=true
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.
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 ..
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);
bro a-b is -5 then so this program return a = -5 and b = 20
@@NadeemKhan-tv6jo *_SAHI H BRO THIK SE CALCULATE KRO OUTPUT IS a=10 AND b= 5_*
@@DEEPANSHU_NAG
use es6 usse or aache se ho jayga
console.log(`value of a is: ${a} and value of b is : ${b} .`);
@@631singh ✌🏻
let a =5;
let b =10;
[a,b]=[b,a]
console.log(a,b)
sir awesome teaching big fan aap ka hu sabhi tutorial ,decent hai learnable hai easily understanding hai ,god bless you sir,
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
boom guyz me sikh gya
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.
// 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}`);
Love you bro such a beautiful way to explain thank you for the support Bro Code
awesome explanation sir
Very very nice ❤🎉
You are god !
Amazing vedio
Awesome explanation 👏🏻
Finally 300k Completed, Congratulations brother...
1 2 3 and boom guys😆😆
btw the vdo was helpful👍
Thank you sir
Thank you.
Fabulous
Agar mere array me 100 value hai or mujhe first and last value dikhani hai to kya mujhe 98 "," comma use karne honge?
[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 ???
mind blowing sir
Sir, how this work for a large number of array elements? Please elaborate
bht awla
thank you so much sir
very good illustration
Hi, how can I get first and last element of array having dynamic length using method you explained ? thanks in advanced
Same Question in my mind
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?
let a = 1;
let b = 2;
a = a*b;
b = a/b;
a = a/b;
console.log(a);
console.log(b);
sir please make a video on geo location html5
Good Contents
❤
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
Swaping two numbers:
let a = 10;
let b = 20;
[a, b] = [b, a];
console.log(`After Swaping a is: ${ a } and b is: ${ b } `);
####boom guys
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}`);
let a = 10;
let b = 20;
a = a + b;
30
b = a -b;
10
a = a-b;
a = 20; b= 10;
let a = 5;
let b = 10;
a = b ;
b = a - 5;
console.log(`value of a is ${a}, value of b is ${b}`);
what if I have thousands of elements in the Array , do I have to use comma 999 times?
Same question here also
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 ???
Nhi aapko simply array[99] likhna hoga
I only want "last wala variable" ye badiya tha 😅
By using XOR operation three times.
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?
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????
var a=5
var b=10
var b=(b-a)
var a=(a+b+b)-a
console.log(a,b);
sir, train status ki api per video banadain. pls
let a = 5;
let b = 6;
a= a+b;
b= a-b;
a= a-b;
that's it.
thapa jani advance JS or ES6 same hai ya diffrance hai dono me..
let a=5; let b=10; b=(b-a); console.log(b); a=(b+a); console.log(a);
5
10
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
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)
but agar,array ki values zyda ho kasy pata chala ga ky total kitna comaa ana hai?????????
array ka size na pta ho to ? matlab arry me values dynamically backend se aa rhi hon to destructuring kaise karenge ?
array.length - 1;
instead of const can write let while declaring array details
Task
let [b, a] = [a, b]
Thapa Sir ES6 pura complete kijiye taaki apne resume me daal kar interview de saku
sure
@@ThapaTechnical ♥
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
please sir make a tutorial to make visitor counter in php
const arr = [5, 10];
let [a, b] = arr;
[a, b] = [b, a];
console.log([b, a]);
do you have any refrence video for anonymous fuctions, IIFE, fiter , map& reduce...please share
just watch JavaScript in 16+hrs video of mine.. You will find evryting
@@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
If we have 1000 items of array than how will handle that comma,.
😱
Yes
This is not included in the Advanced tutorial playlist.. please add this video there also
Please make a video on youtube and facebook downloader script in php for any website
let a=5; let b=10;
[a,b]=[b,a]
console.log(a)
console.log(b)
Sir php framework par video banayi like laravel. Codegniter
let A = 25;
let B = 50;
[A,B] = [B,A];
console.log("A = " + A);
console.log("B = " + B);
why you always use const for declaring variable or array, cant we use let?
Yes
what is java
//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}`);
osm
thanks bro :)
@@ThapaTechnical Thanks U Sir G,,,,
सर में एक वेबपेज बनाया हू JavaScript se। RUclips जैसा
पर वीडियो चलाने पर दूसरा वीडियो भी चलता रहता है दूसरा वीडियो स्टॉप केसे करूं ये समछ में नहीं आ रहा है।
Please help me sir.....😟
Thanks
Sir ek problem hai xampp pe login registration form work Kar raha hai but hosting pe nahi Kar raha hai
Index find karna hoga with hardcore no.
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.
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
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]
Program:
सारा कंसोल पे लोड हो रहा है, क्रिपया एचटीएमएल पेज पर लोड करना बताएं।
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}`);
b = b-a;
a=a+a;
let x= 2;
let y= 4;
x = x+y;
y= x-y;
x= x-y;
console.log(x);
console.log(y);
Bro why you teach your concept of JS is so weak
3 2 1 pilleyy
stop saying boom
stop doing this boom boom please
thank you so much sir
let a=5;
let b=10;
a = a+b;
b = a-b;
a = a-b;
console.log(a);
console.log(b);