Skip to content

Instantly share code, notes, and snippets.

Created January 8, 2017 11:34
Show Gist options
  • Save anonymous/365718620f200b6e93a13fd7228c9a48 to your computer and use it in GitHub Desktop.
Save anonymous/365718620f200b6e93a13fd7228c9a48 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/vicazawina
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
function sym(args) {
var total = [];
var numbers = [];
var filtered = [];
for(var i=0; i<arguments.length; i++) {
total.push(arguments[i]);
}
for(var l=0; l<total.length; l++) {
total[l].forEach(function(num) {
numbers.push(num);
});
}
// for(var m=0; m<number.length; m++) {
// if(filnumber[m])
// }
console.log(numbers.indexOf(10));
console.log(numbers);
}
sym([1, 2, 3], [5, 2, 1, 4]);
</script>
<script id="jsbin-source-javascript" type="text/javascript">function sym(args) {
var total = [];
var numbers = [];
var filtered = [];
for(var i=0; i<arguments.length; i++) {
total.push(arguments[i]);
}
for(var l=0; l<total.length; l++) {
total[l].forEach(function(num) {
numbers.push(num);
});
}
// for(var m=0; m<number.length; m++) {
// if(filnumber[m])
// }
console.log(numbers.indexOf(10));
console.log(numbers);
}
sym([1, 2, 3], [5, 2, 1, 4]);
</script></body>
</html>
function sym(args) {
var total = [];
var numbers = [];
var filtered = [];
for(var i=0; i<arguments.length; i++) {
total.push(arguments[i]);
}
for(var l=0; l<total.length; l++) {
total[l].forEach(function(num) {
numbers.push(num);
});
}
// for(var m=0; m<number.length; m++) {
// if(filnumber[m])
// }
console.log(numbers.indexOf(10));
console.log(numbers);
}
sym([1, 2, 3], [5, 2, 1, 4]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment