15 lines
312 B
TypeScript
15 lines
312 B
TypeScript
//// [templateStringInSwitchAndCase.ts]
|
|
switch (`abc${0}abc`) {
|
|
case `abc`:
|
|
case `123`:
|
|
case `abc${0}abc`:
|
|
`def${1}def`;
|
|
}
|
|
|
|
//// [templateStringInSwitchAndCase.js]
|
|
switch ("abc" + 0 + "abc") {
|
|
case "abc":
|
|
case "123":
|
|
case "abc" + 0 + "abc":
|
|
"def" + 1 + "def";
|
|
}
|