{"version":"1.0","type":"rich","title":"JavaScript Promises","description":"This example demonstrates JavaScript Promise chains for handling asynchronous operations. It shows two scenarios: a primer where sequential API calls resolve and reject at different timeouts, and a currency conversion flow that fetches exchange rates from a simulated service before processing a card payment. The code uses native `Promise` objects, `setTimeout` for delays, and `.then()` callbacks to manage dependent operations. Data flows from mocked responses containing currency rates and payment statuses, with success and error paths logged to the console.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-6bd84893f2cbd9ba093d5923973a9683?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}