Been trying for about an hour now, can't get my array to show its length upon a button press. It did show its length at one attempt, but it was a totally different amount to the amount of elements in the array. I read somewhere that it happens that way sometimes, and has something to do with undefined elements. But now it isn't showing any alerts at all.
var fruits("Banana", "Apple", "Orange")
function myFunction() {
alert(fruits.length)
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<body>
<script>
src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" >
</script>
<script src="Arrays.js">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
</head>
<button id="lengthbutton" onclick="myFunction()"> Click me to find out length </button>
</body>
</html>