Last active
March 26, 2017 13:43
-
-
Save gustavomdsantos/0b661c28f1d502c65a10736a42d6a83c to your computer and use it in GitHub Desktop.
Variáveis e funções estáticas no CoffeeScript existem, e na documentação da linguagem (http://coffeescript.org) não tem isso especificado. Abaixo está um exemplo básico disso.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Acesso estático | |
| class Pessoa | |
| getNome: () -> | |
| return "nome"; | |
| @getIdade: () -> | |
| return 36 | |
| a = new Pessoa() | |
| a.getNome() | |
| Pessoa.getIdade() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment