freeCodeCamp/guide/chinese/certifications/javascript-algorithms-and-d.../basic-javascript/concatenating-strings-with-.../index.md

12 lines
434 B
Markdown
Raw Normal View History

---
title: Concatenating Strings with Plus Operator
localeTitle: 用Plus运算符连接字符串
---
## 用Plus运算符连接字符串
连接意味着链接在一起。将'+'运算符想象为将字符串链接在一起的链;像添加数字一样添加字符串。确保你的拼写正确!记下单词之间的空格。
```
var str = "Good " + "job!" // It says "Good job!"
var abc = "Good" + "job!" // It says "Goodjob!"
```