Articles → JAVASCRIPT → Array Concat Function In Javascript

Array Concat Function In Javascript






Purpose





Example


    <!DOCTYPE html>
    <html>
        <head>
            <meta name="viewport" content="width=device-width, initial-scale=1">
                <script>
         const array1 = ['a', 'b', 'c'];
         const array2 = ['d', 'e', 'f'];
         const array3 = array1.concat(array2);
         
         console.log(array3);
      </script>
            </head>
            <body></body></html>



Output


Picture showing the output of the Array concat function in JavaScript



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, September 2, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250