此代码的输出:
navigator.serviceWorker.ready
.then(sw=>{
addData('sync-posts',post)
.then(()=>{
return sw.sync.register('sync-new-posts');
})
.then(()=>{
var snackbarContainer = document.querySelector('#confirmation-toast');
const data = {message: 'Your post was saved for syncing!'};
snackbarContainer.MaterialSnackbar.showSnackbar(data);
})
.catch(err=>{
console.log(err);
});
})
看起来像这样:
但是如果我对变量使用“Import-Csv”:
$var1 = @("ServerA","ServerB","ServerC")
$var2 = @("ServerX","ServerY","ServerZ")
Write-Host "`nShow me var1`n"
$var1
Write-Host "`nShow me var2`n"
$var2
输出如下:
为什么在使用Import-Csv时它会合并输出?
如何让第二个输出看起来像第一个输出,它分别输出var1和var2的值?