Ezequiel rojo

Generation

generate functionMon, 29 May 2023

generar un algoritmo donde cree una burbuja de color azul cun un numero en su interior del 1 al 20

Script function generateBubblesForNumbers(numbers) { let container = document.createElement('div'); container.style.display = 'flex'; container.style.flexWrap = 'wrap'; for (var i = 0; i < numbers.length; i++) { var number = numbers[i]; let bubble = document.createElement('div'); bubble.style.backgroundColor = 'blue'; bubble.style.width = '30px'; bubble.style.height = '30px'; bubble.style.borderRadius = '50%'; bubble.style.display = 'flex'; bubble.style.alignItems = 'center'; bubble.style.justifyContent = 'center'; bubble.style.margin = '5px'; bubble.textContent = number; container.appendChild(bubble); } document.body.appendChild(container); } generateBubblesForNumbers([1, 2, 3, 4, 5, 6, 7, 8,

Questions about programming?Chat with your personal AI assistant