Skip to content

3) Things to decide for our language (the week of the 19th)

Rachel Rivera edited this page Jan 18, 2015 · 1 revision
  • We discussed briefly how we like some of the implicit type conversion that happens in JavaScript. We need to decide exactly what we want to coerce. (example of coercion seen below; undefined -> false)
// the following script alerts "Goodbye"
var x = undefined;
if (x) {
    alert("Hello");
} else {
    alert("Goodbye");
}
  • Syntax that distinguishes for loops with a counter from for loops without