Pasindu Code Hero
Hi I have a question regarding PS we can use nested if instead of liner if right because their functionalities are same except for the way it is written
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
well. technically you can use any. regular, liner or nested when comes to the if statements. but… i prefer regular if statements since the lecturer only focused on that.
Instead of nested if, you can simply use logic gates to do the same thing. Instead of using if statement inside of the statement.
i mean using neated if isnt wrong. Since she havent focused on those stuff, i highly suggesting the regular one with logical operators instead as the safest option