I
I
ikerya2018-03-25 16:48:35
JavaScript
ikerya, 2018-03-25 16:48:35

How to call an object's function if the object's name and the function's name are stored in a variable?

How to call an object's function if the object's name and the function's name are stored in a variable?

let users = {
  go: function() {
    // это нужно вызвать
  }
};

let name = "users.go"; // с помощью этой переменной

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question