+ 3
You have to add whitespace whenever it would be misunderstood what you mean otherwise. For example: var x = 10; varx = 10; var is a keyword and must stand alone, because if you take away the space, JS will try to find 'varx' which doesn't exist. In cases where it's understandable, whitespace doesn't matter. So you can write either of these: document.write('Hello'); document . write ('Hello') ; document .write( 'Hello') ; Study on a bit - these things will become more obvious to you with practice.
18th Mar 2019, 10:08 AM
HonFu
HonFu - avatar