标签:color style str div pre code tab span 程序
  let obj = {
      obj1 :{
          say:‘hi1‘
      },
      obj2 :{
          say:‘hi2‘
      }
  }
  
 let one = obj1
 let two = say
 
 // 等于 obj.obj1.say
 // `` 是ESC下 TAB上的哪个键
 console.log(
     obj[`${one}`][`${two}`]
 )
 // 输出 > hi1
标签:color style str div pre code tab span 程序
原文地址:https://www.cnblogs.com/iblackly/p/13176175.html