JSFiddle - React, Tailwind, and code Playground

by Nenad Novakovic

JavaScript

function cevapi () {
    var x = prompt("Unesite broj cevapa...", ""),
        cevap = 66.66,
        gramaza = cevap * x;
    
    var struct = document.createElement("div");
    struct.id = "cevapi";
    document.getElementsByTagName('body')[0].appendChild(struct);
    
    struct.innerHTML = 'Cevap meso ima tacno ' + Math.round(gramaza) + ' g';
}

cevapi();