I would like to be able to transmit in my function values that are not integers but strings.
I do not have any problem with the integers but for the chains, I have a problem of declaration but I do not understand where it comes from ...
<div id="test"></div>
<script>
var b = "hello";
var test = document.getElementById('test');
test.innerHTML += "<button onclick='myFunction("+b+")'>Click me</button> ";
function myFunction(MyVar) {
console.log(MyVar);
}
</script>