Is both defining a function and using it in a literal notation for an object possible?
var solution1 = {
compute: function() {
var toplam = 0;
for (var i = 1; i < 1000; i++) {
if (i % 3 == 0 || i % 5 == 0)
toplam += i;
}
return toplam;
},
answer: solution1.compute() //This is the problem.
}