Skip to main content
code formatting
Source Link
Yu Hao
  • 123k
  • 50
  • 252
  • 305

The colon is for implementing methods that pass "self"self as the first parameter. So x:bar(3,4) shouldx:bar(3,4) should be the same as x.bar(x,3,4)x.bar(x,3,4).

The colon is for implementing methods that pass "self" as the first parameter. So x:bar(3,4) should be the same as x.bar(x,3,4).

The colon is for implementing methods that pass self as the first parameter. So x:bar(3,4) should be the same as x.bar(x,3,4).

Source Link
BMitch
  • 270.3k
  • 51
  • 554
  • 511

The colon is for implementing methods that pass "self" as the first parameter. So x:bar(3,4) should be the same as x.bar(x,3,4).