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

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.

主站蜘蛛池模板: 迁西县| 佛教| 治县。| 平阳县| 禄丰县| 湖南省| 尉犁县| 双鸭山市| 佛坪县| 台中县| 乌恰县| 马鞍山市| 枣阳市| 马关县| 甘肃省| 岫岩| 阿勒泰市| 乌恰县| 定日县| 澄城县| 托里县| 吉木萨尔县| 长治市| 班戈县| 保康县| 怀安县| 乌恰县| 高邮市| 绍兴县| 虎林市| 张家港市| 沽源县| 太康县| 五寨县| 汕尾市| 桓台县| 翁牛特旗| 班戈县| 塔河县| 乐昌市| 英超|