My variable passed in a function is not being picked, look at the foollowing example:
<html>
<head>
</head>
<body>
</body>
<script>
function sample (item, value){
var object = {
item: value
}
console.log(object);
}
sample("one", false);
</script>
</html>
This will output:
{ item: "false" }
instead of:
{ "one": "false" }
why item
is not being picked as input?