追加到字符串变量 [英] Append to string variable

查看:107
本文介绍了追加到字符串变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何添加一个字一个已经填充的字符串变量与空间?

How can I append a word to an already populated string variable with spaces?

推荐答案

这样的:

var str = 'blah blah blah';
str += ' blah';

str += ' ' + 'and some more blah';

这篇关于追加到字符串变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆