15.8k views
1 vote
Write Javascript to display greatest number am- ong any two number.​

1 Answer

6 votes

Step-by-step explanation:

function integer(a,b) { if (a > 0 && b > 0 && a > b) { document. write("The larger number is " + a ); } else if (a > 0 && b > 0 && a < b) { document. write("The larger number is " + b); } else if (a === b && a > 0 && b > 0) { document. write("Both numbers are equal!") } else { document

User VinceFR
by
3.4k points