HTML:
<span id="test">0</span> <button onclick="test(test)">Test</button>
Javascript:
function test(id) { document.getElementById(id).innerHTML = 1; }
Uncaught Typeerror: Cannot set property innerHTML of null
<button onclick="test('test')">Test</button>
This will work
A string is wrapped in '' or ""
''
""