Ask coding questions

← Back to all posts
Some JS
isaiah08 (54)

Why is this not working?

<p id='question'></p>
<p id='a'></p>
<p id='b'></p>
<p id='c'></p>
<p id='d'></p>



<script>
var variable_knowledge = 0;

	

function quiz_variable {
	document.getElementById('question').innerHTML = 'Which way would you create a variable called var that holds the interger 13?'
	document.getElementById('a').innerHTML = "A. print 13"
	document.getElementById('b').innerHTML = "B. var = 13"
	document.getElementById('c').innerHTML = "C. var == 13"
};
	
quiz_variable()
</script>
Answered by idrgplayer (117) [earned 5 cycles]
View Answer
Commentshotnewtop
idrgplayer (117)

I think you mean function quiz_variable() you forgot the parentheses after the function name.
function quiz_variable(){-code goes in here}