String getMonthName(int index) {
var months = ['January', 'February', 'March', 'April','May','June', 'July', 'August', 'September', 'October', 'November', 'December'];
if (index >= 0 && index < 12) {
return months[index];
} else {
return 'Invalin months index';
}
}
void main() {
var i = 2;
print('Test function for ${i} - ${getMonthName(i)}');
}
Created
October 1, 2020 17:00
-
-
Save Headmast/91acbd1323877baf5090f9546b3ab8bc to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
все ок