📜  javascript 将地址加入字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:34.190000             🧑  作者: Mango

代码示例1
var address = "foo";
var city;
var state = "bar";
var zip;

text = [address, city, state, zip].filter(Boolean).join(", ");
console.log(text)