init at work

This commit is contained in:
Mathias Schneider
2026-03-27 12:58:01 +01:00
parent 352c352056
commit 8d40597732
60 changed files with 16498 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
# Template Literals
Template literals are strings enclosed by backticks and support interpolation.
## Syntax
```ts
const year = '2026';
const month = '03';
const day = '24';
const label = `${year}-${month}-${day}`;
console.log(label); // '2026-03-24'
```
## Why use them
- Easier than concatenation.
- More readable for multi-part strings.
- Supports multiline text.
## Python Comparison
Equivalent concept to Python f-strings:
```py
label = f"{year}-{month}-{day}"
```