Skip to content

Instantly share code, notes, and snippets.

@gophersumit
Created June 15, 2019 07:54
Show Gist options
  • Select an option

  • Save gophersumit/25f2a8ece4c46b7d0ae83891ca76bb6b to your computer and use it in GitHub Desktop.

Select an option

Save gophersumit/25f2a8ece4c46b7d0ae83891ca76bb6b to your computer and use it in GitHub Desktop.

Revisions

  1. gophersumit created this gist Jun 15, 2019.
    11 changes: 11 additions & 0 deletions increment.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    package main
    import "fmt"

    func main() {
    x := 0
    x++ //valid operation

    fmt.Println(x++) // invalid operation x++ is not an expression

    ++x // invalid operation , prefix increment does not exist in go
    }