Number isNegative Property

  • Post author:
  • Post category:Dart
  • Post comments:2 Comments
Number isNegative Property

In this guide, we will discuss Number isNegative Property. This property returns a Boolean value true if the number is a negative number.

Syntax

num.isNegative 

Example

void main() { 
   int posNum = 10; 
   int negNum = -10; 
   
   print(posNum.isNegative); 
   print(negNum.isNegative); 
} 

It will produce the following output −

false 
true

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply