Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Merge Two Arrays</title> </head> <body> <script> let pets = ["Cat", "Dog", "Parrot"]; let wilds = ["Tiger", "Wolf", "Zebra"]; // Creating new array by combining pets and wilds arrays var animals = pets.concat(wilds); document.write(animals); // Prints: Cat,Dog,Parrot,Tiger,Wolf,Zebra </script> </body> </html>