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

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.

主站蜘蛛池模板: 迭部县| 云南省| 海原县| 常州市| 天柱县| 将乐县| 达孜县| 赤峰市| 永登县| 响水县| 息烽县| 河津市| 茌平县| 宜州市| 香河县| 龙海市| 肃宁县| 博客| 南昌县| 鄢陵县| 蕉岭县| 紫金县| 巨野县| 河南省| 固始县| 孝义市| 南通市| 博客| 房产| 正安县| 林口县| 凯里市| 高要市| 鄂尔多斯市| 庆安县| 张北县| 白银市| 南江县| 垦利县| 台东县| 凤庆县|