Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby function arguments

def testing(a, b = 1, *c, d: 1, **x)
  p a,b,c,d,x
end
testing('a', 'b', 'c', 'd', 'e', d: 2, x: 1)

# "a"
# "b"
# ["c", "d", "e"]
# 2
# {:x=>1}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ruby #function #arguments
ADD COMMENT
Topic
Name
5+3 =