js/app.js
/* The function checks if user is interested in playing */
The function checks if user is interested in playing
The function checks if user is interested in playing
function checkreadyflag(readyflag) {
	readyflag = readyflag.toLowerCase();
	var expectedvalue1 = 'y';
	var expectedvalue2 = 'yes';
	if (readyflag === null) {
		alert('No User Input. Thanking for Playing')
	}
	else if (readyflag === expectedvalue1 || readyflag === expectedvalue2) {
		alert('HOOOO!! Lets play the game');
	}
	else {
		alert('Please enter yes or y to play game');
	}
}
function checkreadyflag ( readyflag ) { readyflag = readyflag . toLowerCase ( ) ; var expectedvalue1 = 'y' ; var expectedvalue2 = 'yes' ; if ( readyflag === null ) { alert ( 'No User Input. Thanking for Playing' ) } else if ( readyflag === expectedvalue1 || readyflag === expectedvalue2 ) { alert ( 'HOOOO!! Lets play the game' ) ; } else { alert ( 'Please enter yes or y to play game' ) ; } }
The function checks if user is interested in playing
The function checks if user is interested in playing