#so if i was writing say

1 messages · Page 1 of 1 (latest)

smoky shore
#

if (bool = true)

#

{

#

print("it is true);

#

}

#

would it make any differece if i just did

#

if (bool = true)

#

{

#

print("it is true);

#

return;

#

}

brave summit
#

It doesn't make any difference unless there is code after that line

stiff lodge
#

No, apart from the fact your if statement is malformed there is no difference, however
if (string.isNullOrEmpty(mystring)) return;
//Now I can do stuff with myString because I know it contains stuff
// Does make a difference

#

try this

if (bool == true)
{
print("it is true);
}
print ("it is false");

and

if (bool == true)
{
print("it is true);
return;
}
print ("it is false");

and tell me the difference

smoky shore
smoky shore
stiff lodge
# smoky shore and finish the speech marks 💀

does not matter in the case of an example. but the point is a return in the right place can make code easier and cleaner.
JSP and OOP rules would tell you never to use that because an else in an if can do the same. this is a load of bs, a return or a break in a for or while can make all the difference in your code, just use it wisely

smoky shore
#

oh okay i ended up running it on visual studios

#

the difference is clear but

#

hm

#

okay thank you a lot