0

Can someone help me with this basic question:)?

I dont know why this is not working: var banan = 10 % 5; document.log("banan")

19th May 2022, 6:30 AM
christiaan posthumus
6 Answers
+ 3
Remove the quotation marks that surround the variable name, banan. Quotation marks tell Javascript that whatever is between them is a literal string. You want it to print the contents of the variable banan, so leave the quotes out.
19th May 2022, 6:41 AM
Brian
Brian - avatar
+ 2
try console.log(banan) you do not enclose a variable in quotes, or it will be treated as text.
19th May 2022, 6:36 AM
Moshe Schnitzler
Moshe Schnitzler - avatar
0
It dont work
19th May 2022, 7:27 AM
christiaan posthumus
0
var banan = 10 % 5; document.log (banan)
19th May 2022, 7:28 AM
christiaan posthumus
0
Possibly you mean: console.log (banan)
19th May 2022, 7:41 AM
Brian
Brian - avatar
0
Remove the quotation marks. console.log(banan) will work as expected.
19th May 2022, 9:30 AM
Abosi Godwin
Abosi Godwin - avatar