官术网_书友最值得收藏!

Concatenating strings

String concatenation is the result of combining multiple string literals to form an expression. So, let's create one by first entering two string literals:

Combining these two gives us a string concatenation. We can combine strings by using the + operator, add the following:

let full = firstName + lastName

When you look in the Results Panel, you will notice that there is no space between our first and last names.

Also, if we just put the variables in quotes, they will revert to simple string literals and will no longer be variables.

主站蜘蛛池模板: 文成县| 邢台县| 南部县| 镇雄县| 偃师市| 邳州市| 冷水江市| 防城港市| 朝阳县| 琼海市| 呼伦贝尔市| 榆社县| 潜山县| 普格县| 苏尼特左旗| 沙湾县| 辽宁省| 荔浦县| 崇文区| 巫山县| 定边县| 凯里市| 绥江县| 华亭县| 罗平县| 永登县| 天水市| 集贤县| 公主岭市| 光山县| 临沂市| 依安县| 万全县| 准格尔旗| 宁德市| 肇东市| 镇坪县| 旅游| 玉屏| 内江市| 鸡东县|