I want to create some gauges, but my Gauge object remains undefined.
var doesntwork;
function create_gauge(name, id, min, max, title, label) {
name = new JustGage({
id: id,
value: 0,
min: min,
max: max,
donut: false,
gaugeWidthScale: 0.3,
counter: true,
hideInnerShadow: true,
title: title,
label: label,
decimals: 2
});
}
create_gauge(doesntwork, "g2", 0, 100, "Füllstand", "%");
console.log(doesntwork); //undefined
why? can't i pass variables to a function?