Consider the following code segment:


if (value > 0)

System.out.println("positive");

if (value < 0)

System.out.println("negative");

if (value == 0)

System.out.println("neither");


Rewrite the code in the space below so that it uses an if-else structure instead of 3 if statements.

IM struggling does anyone know how to do this

Respuesta :

Function demo {

If (value & gt;0);

If-else (...)

If-else (...)
}



I’m not on the computer right now but lemme know if this doesn’t work. Try going to inspect element on your html page and then console log and your issue should show their.
You may need to add a try and catch but idk.
Q&A Education