yoplaya
❔ Cleanest way to initialize string outside of conditional statement where it's assigned?
string str = ""
if(something) {
str = "a"
} else {
str = "b"
}
Is this the cleanest way? or is there a better way to expose the str outside of conditional scope without this dirty empty string initialization
6 replies