const str = 'My name is young\nI\'m young';const str = 'My name is young\r\nI\'m young';const str = 'My name is young\rI\'m young';在不同的操作系统,不同的浏览器中显示出来的效果一样吗?console.log('My name is young\nI\'m young');console.log('My name is young\r\nI\'m young');console.log('My name is young\rI\'m young');在Windows7上的Chrome的console中输出的结果是:My name is youngI'm youngMy name is youngI'm youngMy name is youngI'm young在写代码时,要考虑可能的平台差异性吗?
添加回答
举报
0/150
提交
取消