Answer the question
In order to leave comments, you need to log in
Checking for anti-plagiarism of the thesis has decreased, what to do?
Hello, please tell me how to be. While writing my thesis (mobile program on android), I asked questions on stackoverflow, toaster and in various other programming forums. Now I checked for uniqueness, the program detects my program text as plagiarism and shows those forums where I asked the question. What to do? this is my information
Answer the question
In order to leave comments, you need to log in
You have initialized the foo and bar variables.
Further, when you set a property on the object object, you take foo as the key. That is:
Perhaps you wanted the property foo, that is, like this:
But in your example, you use an object as a key, and the object only accepts strings as a key. Therefore, your object is converted to a string and after conversion it turns out like this:
So your object will be like this:
var object = {
"[object Object]":"value"
};
console.log(object["[object Object]"]);
Here's why:
From your own link:
Property names can be strings. This means that non-string objects can be used as keys in an object. Any non-string object, including numbers, is cast to a string via the toString method.
...
Also outputs "value" because foo and bar are converted to a string . In the SpiderMonkey JavaScript engine, this string will be "['object Object']".
Do a rewrite of plain text and refactoring of the program code. That's it, your problem is solved.
change the names of variables, objects, classes. change the code a little, add comments and everything will be fine. In the case of regular text, paraphrase.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question