连接
连接同时涉及两个或以上字符串,创建了一个组合这些原始数据的更长的字符串。在Javascript中使用 + 运算符。
var bigStr = 'Hi ' + 'JS strings are nice ' + 'and ' + 'easy to add';
Exercise
Correct!
var firstName = "John";
var lastName = "Smith";
var fullName =
var firstName = "John"; var lastName = "Smith"; var fullName = firstName + " " + lastName;
assert(fullName === 'John Smith');