Home  >  Q&A  >  body text

javascript - Why does a function in the form [string](a,b,c){...} report an error?

I want to implement a tab and call the corresponding interface (already packaged) based on the value of the tabIndex passed in

But an error occurred:

Is this way of writing wrong?

phpcn_u1582phpcn_u15822683 days ago531

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-19 10:41:19

    this[getData]

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-19 10:41:19

    However, I thought of a way, first write the function into methods, and then use this[getData] and it works

    reply
    0
  • Cancelreply