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 returns 100 or null. Also, assign a return value of the function to a variable named status that can’t be null. Give status a default value of 0, if generateRandom() function returns null.