Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
ES6 Interview Questions
→
ES6 Basic Interview Questions in ES6 Interview Questions
→
How do you use Destructuring Assignment to swap va...
1.
How do you use Destructuring Assignment to swap variables?
Answer»
VAR
a =
1
,
B
=
2
;[a, b] = [b, a];console.log(a); // 2console.log(b); // 1
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
What is the result of the spread operator array shown below?
How do you use Destructuring Assignment to swap variables?
Compare the ES5 and ES6 codes for object initialization and parsing returned objects.
Name some string functions introduced in ES6.
Name some array methods that were introduced in ES6.
What is Babel?
What is the reason behind adding Symbol to ES6?
What is the difference between for..of and for..in?
What is Bubbling and Capturing?
Which keyword can be used to deploy inheritance in ES6?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies