S
S
shnicel2015-12-21 20:10:15
JavaScript
shnicel, 2015-12-21 20:10:15

Who's to say what's funny?

VK.api('users.get', {fields: 'photo_100,city', v: '5.27'}, function(r) {
    console.log(r.response[0].id);
    $('#user').append('+ r.response[0].id +');
});

What the hell is in the console id, and in the div id it displays + r.response[0].id +, why not id too? Even I can’t catch up, tell me please!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2015-12-21
@shnicel

Because it's a '+ r.response[0].id +'string.
Game - to believe thatr.response[0].id == '+ r.response[0].id +'

VK.api('users.get', {fields: 'photo_100,city', v: '5.27'}, function(r) {
    console.log(r.response[0].id);
    $('#user').append(r.response[0].id);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question