What is If-else statement in #golang?

1 year ago
8

In this video, we learn about the if-else statement in golang
There are different ways to #ifelse #statement
- Simple way of using if
if (condition) {}
- if condition true if block will be executed otherwise else block will be executed
if(condition){}else{}
- if condition true if block will be executed then again check the condition in else if condition otherwise else block will be executed
if (condition){}else if(condtion{}else{}
- if condition true if block will be executed inside if block we can check another condition inside if .. it is known as nested if .
if (condition){if(condition){}else{}}else{}

Thanks for Watching
#keepSupporting
Don't forget about like, subscribe, share and comment.
BitsBytes
Bits Bytes

Loading comments...