User Profile
Collapse
-
I have never used flag, so how can I get my function to work returning an overall true or false? Still stuggling... -
Trying again...
Thanks for the reply both,
I'm trying to amend my code to take into account both suggestions and have come up with:
Code:var drawnBalls = [1,2,3,4,5]; var selectedBalls = [1,2,3,4,5]; document.write(drawnBalls + '<BR>'); document.write(selectedBalls + '<BR>'); function allBallsMatch(drawnBalls, selectedBalls) {
Leave a comment:
-
help needed with function
Hi guys,
I'm trying to complete a function that does the following:
/* Tests if all balls selected match all balls drawn in the same order
The function takes two arguments:
an array of drawn balls
an array of selected balls.
The function code compares each ball in one array with the ball at the same position in the other array.
The function... -
-
Stuck
Code:<HTML> <HEAD> <TITLE>M150 TMA 5 : Programming : Task 3 - User selection of balls</TITLE> <SCRIPT language="JavaScript"> function isAlreadySelected(newSelection, previousSelections) for (var index = 1; index <= previousSelections.length;index = index+ 1) { if (newSelection == previousSelections)
Leave a comment:
No activity results to display
Show More
Leave a comment: