Skip to content

Instantly share code, notes, and snippets.

@sakshstore
Created August 10, 2023 03:59
Show Gist options
  • Save sakshstore/a153051a7c3b8665dbceb89cab753b1d to your computer and use it in GitHub Desktop.
Save sakshstore/a153051a7c3b8665dbceb89cab753b1d to your computer and use it in GitHub Desktop.
javascript array merge
<!doctype html>
<html lang="en" data-bs-theme="auto">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Hugo 0.115.4">
<title>Heroes · Bootstrap v5.3</title>
</head>
<body>
<script>
const numbers1 = [1, 2, 3];
const numbers2 = [4, 5, 6];
const mergedArray = [...numbers1, ...numbers2];
console.log(mergedArray);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment