Question for Practice 6
Question For Practice 6
- Write a program in a dart to create an age variable and assign a
null
value to it using?
. - Write a function named
generateRandom()
in dart that randomly returns100
ornull
. Also, assign a return value of the function to a variable namedstatus
that can’t be null. Give status a default value of 0, ifgenerateRandom()
function returns null.