CoffeeScript: Difference between revisions

Content deleted Content added
link fix
m semicolons
Line 36:
 
<syntaxhighlight lang="javascript">
const mass = 72;
const height = 1.78;
const BMI = mass / height ** 2;
if (18.5 <= BMI && BMI < 25) { alert('You are healthy!') }
</syntaxhighlight>
Line 58:
[x, y] = [y, x%y];
} while (y !== 0)
return x;
}
</syntaxhighlight>
Line 86:
$(document).ready(function() {
// Initialization code goes here
});
</syntaxhighlight>
 
Line 94:
$(function() {
// Initialization code goes here
});
</syntaxhighlight>
 
Line 164:
// ...
function baz() {
var foo = "bar";
console.log(`foo = ${foo}`);
}
// ...