JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/dark-hive/jquery-ui.css" type="text/css" media="all" />
<style>
    #effect { width: 240px; height: 100px; padding: 0.4em; position: relative; margin-bottom:1em; }
    #effect h3 { margin: 0; padding: 0.4em; text-align: center; }
    .ui-effects-transfer { border: 2px dotted gray; } 
    .center {margin-left: auto;   margin-right: auto;   width: 8em;}
</style>

<div class="center">
<div id="answer" title="respuesta ejercicio 1" style="display:none"></div>
<div id="effect" class="ui-widget-content ui-corner-all">
Encontrar la suma de números enteros de todos los múltiplos de 3 o 5 menores que 1000. Ejemplo, 3 + 5 + 6 + 9 ....
</div>
<input type="button" id="run1" value="ejecutar ejercicio 1" >
</div>

JavaScript

$(document).ready(function() {

$( "#answer" ).dialog({
    autoOpen: false,
    show: "slide",
    hide: "drop"        
    });
    $("#run1").button().click(function(){
        $("#answer").dialog('open')
    $("#answer").html(problema1(1000,3,5));
    });

});

  function problema1(max, num1, num2){
    var count = 0;
    var acc = 0;
    for(count= 0; count<max; count++){
        if(!(count%num1) ||  !(count%num2)){
            acc += count;
        }
    }
    return acc;    
}