DEV Community

Tony Colston
Tony Colston

Posted on

the elvis operator

I was reading through Groovy 3.0 release notes

Lots of stuff but what caught my eye was the elvis operator

// original elvis operator

// shortened elvis operator
Enter fullscreen mode Exit fullscreen mode

Looks longer to me. :)

More on the elvis operator here at wikipedia if you have not encounter such a thing before:

Top comments (0)