<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script>
// 检测获取字符串长度 length
var str = 'my name is ben';
console.log(str.length);
// 字符串拼接 + 只要有字符串和其他类型拼接 最终的结果是字符串类型(数值相加,字符相连)
console.log('沙漠' + '骆驼');
console.log('pink老师' + 18);
console.log('pink' + true);
console.log(12 + 12);
console.log('12' + '12');
</script>
</head>
<body>
</body>
</html>