Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
fetch("/api/user/1") .then(res => res.json()) .then(user => fetch(`/api/posts?userId=${user.id}`)) .then(res => res.json()) .then(posts => render(posts)) .catch(err => showError(err));
Result
Open