
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to duplicate elements of an array in the same array with JavaScript?
Following is the code to duplicate elements of an array in the same array −
Example
Document Duplicate elements of an array in the same array
[1,2,3,4,'A']Click on the above button to duplicate the elements of the above array
Output
The above code will produce the following output −
On clicking the ‘CLICK HERE’ button −
Advertisements