SHARE
TWEET

Untitled

a guest Jul 24th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*** Syntax ***/
  2. void function_name(a, {opt_param1, opt_param2}) { }
  3.  
  4. /*** Example ***/
  5. print_fruits(a,{b,c}) {
  6.    print("a: " + a.toString() +
  7.          " , b: "+ b.toString() +
  8.          " , c: " + c.toString());
  9. }
  10.  
  11. print_fruits('apple');
  12. print_fruits('apple',b:'guava');
  13. print_fruits('apple',c:'guava',b:'mango');
  14.  
  15. /** Output
  16.   a: apple , b: null , c: null
  17.   a: apple , b: guava , c: null
  18.   a: apple , b: mango , c: guava
  19. */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top