mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
31 lines
475 B
TypeScript
31 lines
475 B
TypeScript
//// [tests/cases/compiler/constDeclarations-scopes2.ts] ////
|
|
|
|
//// [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]
|
|
"use strict";
|
|
// global
|
|
const c = "string";
|
|
var n;
|
|
var b;
|
|
// for scope
|
|
for (const c = 0; c < 10; n = c) {
|
|
// for block
|
|
const c = false;
|
|
b = c;
|
|
}
|