DEV Community

Nilufar Isomiddinova
Nilufar Isomiddinova

Posted on

 

SELECTION STATEMENTS

C++ supports the usual logical conditions from mathematics:

Less than:


a < b

Less than or equal to :


a <= b

Greater than :


a > b

Greater than or equal to :


a == b

C++ has the following conditional statements:

-Use if to specify a block of code to be executed , if a specified condition is true
-Use else to specify a block of code to be executed , if the same condition is false
-Use if else to specify a new condition to test , if the first condition is false.

NOTE THAT' "if" is in lowercase letters . Uppercase letters (If or  IF) will generate an error'
Enter fullscreen mode Exit fullscreen mode
NOTE : 'The code inside { } is the body of the /if/ statement
Enter fullscreen mode Exit fullscreen mode


NOTE : `There can be more than one - else if statement but only one *if* and *else* statements.
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.