A
A
aab1372020-07-21 03:44:06
JavaScript
aab137, 2020-07-21 03:44:06

Why can't I change the properties of the js object?

I am writing a widget
Created an object

var item = {
    "title": "Привет, "+user.first_name+"!",
    //"title_url": "",
    //"title_counter": "",
    "rows": [{
        "title": "Тебя здесь ждали! Подпишись!",
//ну и дальше еще много чего понаписал и скобки все закрыл

I'm trying to change this object And it gives me an error Why? After all, I just want to change the properties of the object
item["rows"][0]["title"] = "Спасибо, что с нами!";
Unable to compile code: non-variable in assignment

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