toUpperCase() is not making the string upper case

前端 未结 7 1958
我在风中等你
我在风中等你 2021-02-11 03:10

I don\'t know what I\'m doing wrong; But somehow .toUpperCase() String-function is not working on my browser or do I get something wrong?

var string          


        
7条回答
  •  轮回少年
    2021-02-11 03:20

    I didn't know that string is unchangeable unless your reassign it with new name

    console.log(i, 'is a ' + typeof i);
    var N = i.toUpperCase();
    console.log(N);
    

提交回复
热议问题