Dart Programming – Abs Method

  • Post author:
  • Post category:Dart
  • Post comments:2 Comments
dart programming abs method

In this guide, we will discuss Abs Method in Dart Programming Language. This property is used to return an integer representing the absolute value of a number.

Syntax

Number.abs()

Example

void main() {  
   var a = -2; 
   print(a.abs()); 
}  

It will produce the following output −.

2

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply