13 lines
352 B
Markdown
13 lines
352 B
Markdown
|
---
|
||
|
title: Appending Variables to Strings
|
||
|
localeTitle: 将变量附加到字符串
|
||
|
---
|
||
|
## 将变量附加到字符串
|
||
|
|
||
|
确保您的拼写和间距正确。附加字符串(存储在变量中)可以像这样完成:
|
||
|
```
|
||
|
var adj = "happy!";
|
||
|
var sent = "Today, I woke up being ";
|
||
|
sent += adj; // The result is "Today, I woke up being happy!"
|
||
|
|
||
|
```
|