Advertisement
AnasB

Dart1

Jun 3rd, 2021
859
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void printer(num n, {String s1, String s2}){
  2.   print(n);
  3.   print(s1);
  4.   print(s2);
  5. }
  6.  
  7. main(){
  8.   printer(1);
  9.   printer(2, s1:"Hello");
  10.   printer(3, s2:"Hi");
  11.   printer(4, s1:"First", s2:"Second");
  12. }
  13. /////////////////////////////////////
  14. void printer(num n,[String s1, String s2]){
  15.   print(n);
  16.   print(s1);
  17.   print(s2);
  18. }
  19.  
  20. main(){
  21.   printer(1);
  22.   printer(2,"Hello");
  23.   printer(3,"Hi");
  24.   printer(4,"First","Second");
  25. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement