S
S
Stroy712019-11-20 13:15:14
JavaScript
Stroy71, 2019-11-20 13:15:14

VS Code hotkey for Python?

Please tell me the key combination to switch between the console and text editing for VS Code.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2018-11-16
@freelancer

success(response) {
  $('#api-wb').html(JSON.parse(response).loads.map(n => `
    <div class="item">
      <div><b>${n.title}</b></div>
      <div><a href="${n.comments_url}">comments (${n.comments_num})</a></div>
      <div><img src="${n.files[0].small}"></div>
    </div>
  `).join(''));
}

A
Alexander Pushkarev, 2018-11-16
@AXP-dev

How to:

fetch('https://woobl.ru/php/api/test/1.php?name=1')
    .then(response => response.json())
    .then(data => data.loads.map(load => console.log(load)));

How not to:
$.ajax({
    url: 'https://woobl.ru/php/api/test/1.php?name=1',
    success: function(response) {
        var data = JSON.parse(response);

        data.loads.map(function (item) {
            console.log(item)
        })
    }
});

In general, use headers in php and you won't have to writeJSON.parse()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question