这两者有什么区别?
let foo:{ [index:string] : string } = {
['hello']: 'world'
};
let bar:{ [index:string] : string } = {
'hello': 'world'
};
world
对于两个值,我得到相同的结果 ( )
console.log(foo['hello'])
console.log(bar['hello'])
这两者有什么区别?
let foo:{ [index:string] : string } = {
['hello']: 'world'
};
let bar:{ [index:string] : string } = {
'hello': 'world'
};
world
对于两个值,我得到相同的结果 ( )
console.log(foo['hello'])
console.log(bar['hello'])