Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Combine Arrays Using Spread Operator in JavaScript</title> <script> // Sample arrays var array1 = ["a", "b", "c"]; var array2 = [1, 2, 3]; // Concatenating the arrays var result = [...array1, ...array2]; document.write(JSON. stringify(result)); </script> </head> <body style="font-family: monospace;"> <!-- Result array will be printed here --> </body> </html>