2014-10-15 02:37:46 +02:00
|
|
|
//// [constDeclarations-scopes2.ts]
|
|
|
|
|
|
|
|
// global
|
|
|
|
const c = "string";
|
|
|
|
|
|
|
|
var n: number;
|
|
|
|
var b: boolean;
|
|
|
|
|
|
|
|
// for scope
|
|
|
|
for (const c = 0; c < 10; n = c ) {
|
|
|
|
// for block
|
|
|
|
const c = false;
|
|
|
|
b = c;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// [constDeclarations-scopes2.js]
|
|
|
|
// global
|
|
|
|
const c = "string";
|
|
|
|
var n;
|
|
|
|
var b;
|
2014-10-15 18:20:46 +02:00
|
|
|
for (const c = 0; c < 10; n = c) {
|
2014-10-15 02:37:46 +02:00
|
|
|
// for block
|
|
|
|
const c = false;
|
|
|
|
b = c;
|
|
|
|
}
|