[英]Remove trailing white space from an object value with Visual Studio Code
我有一個對象如下,
var types = {
'1': 'Trading Status: Active '
}
如何在我對該對象的價值之后刪除多余的空白?
我試過修剪空白設置。 但它沒有用。 我該怎么做?
var types = { '1': 'Trading Status: Active ' } // Remove the extra space console.log(types['1'].trim()) // You can check it there is no more space by the length console.log(types['1'].trim().length)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.