after if block, variable val continues existing? Or it just exists in the if block?
val is no longer accessible after the if statement. the variable is scoped to the if block
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.