mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 14:56:54 +02:00
Fix layout and typos
This commit is contained in:
@@ -31,24 +31,24 @@ Você deveria entender mais de semântica de JavaScript antes de continuar...
|
|||||||
###
|
###
|
||||||
|
|
||||||
# Tarefa:
|
# Tarefa:
|
||||||
numero = 42 #=> número var = 42;
|
numero = 42 #=> var numero = 42;
|
||||||
oposto = true #=> var oposto = true;
|
oposto = true #=> var oposto = true;
|
||||||
|
|
||||||
# Condições:
|
# Condições:
|
||||||
numero = -42 if oposto #=> if (oposto) {número = -42;}
|
numero = -42 if oposto #=> if (oposto) {numero = -42;}
|
||||||
|
|
||||||
# Funções:
|
# Funções:
|
||||||
quadrado = (x) -> x * x #=> var quadrado = function (x) {return x * x;}
|
quadrado = (x) -> x * x #=> var quadrado = function (x) {return x * x;}
|
||||||
|
|
||||||
preencher = (recipiente, líquido = "coffee") ->
|
preencher = (recipiente, liquido = "coffee") ->
|
||||||
"Preenchendo o #{recipiente} with #{líquido}..."
|
"Preenchendo o #{recipiente} with #{liquido}..."
|
||||||
#=>var preencher;
|
#=>var preencher;
|
||||||
#
|
#
|
||||||
#preencher = function(recipiente, líquido) {
|
#preencher = function(recipiente, liquido) {
|
||||||
# if (líquido == null) {
|
# if (liquido == null) {
|
||||||
# líquido = "coffee";
|
# liquido = "coffee";
|
||||||
# }
|
# }
|
||||||
# return "Preenchendo o " + recipiente + " with " + líquido + "...";
|
# return "Preenchendo o " + recipiente + " with " + liquido + "...";
|
||||||
#};
|
#};
|
||||||
|
|
||||||
# Alcances:
|
# Alcances:
|
||||||
@@ -90,17 +90,18 @@ cubes = (math.cube num for num in list)
|
|||||||
# return _results;
|
# return _results;
|
||||||
# })();
|
# })();
|
||||||
|
|
||||||
comidas = ['brócolis', 'espinafre', 'chocolate']
|
comidas = ['brocolis', 'espinafre', 'chocolate']
|
||||||
eat alimento for alimento in comidas when alimento isnt 'chocolate'
|
eat alimento for alimento in comidas when alimento isnt 'chocolate'
|
||||||
#=>comidas = ['brócolis', 'espinafre', 'chocolate'];
|
#=>comidas = ['brocolis', 'espinafre', 'chocolate'];
|
||||||
#
|
#
|
||||||
#for (_k = 0, _len2 = comidas.length; _k < _len2; _k++) {
|
#for (_k = 0, _len2 = comidas.length; _k < _len2; _k++) {
|
||||||
# alimento = comidas[_k];
|
# alimento = comidas[_k];
|
||||||
# if (alimento !== 'chocolate') {
|
# if (alimento !== 'chocolate') {
|
||||||
# eat(alimento);
|
# eat(alimento);
|
||||||
# }
|
# }
|
||||||
|
```
|
||||||
|
|
||||||
## Recursos adicionais
|
## Recursos adicionais
|
||||||
|
|
||||||
- [Smooth CoffeeScript](http://autotelicum.github.io/Smooth-CoffeeScript/)
|
- [Smooth CoffeeScript](http://autotelicum.github.io/Smooth-CoffeeScript/)
|
||||||
- [CoffeeScript Ristretto](https://leanpub.com/coffeescript-ristretto/read)
|
- [CoffeeScript Ristretto](https://leanpub.com/coffeescript-ristretto/read)
|
||||||
|
Reference in New Issue
Block a user