+ 1

Semicolon ; at the end of the line, needed ?

Hello. I'm a beginner, in Java Script. I want to ask, for what is the semicolon ; at the end of the line, needed, if you get the same result, also without the semicolon ; at the end of the line ? Thanks.

4th Jun 2019, 10:01 PM
Adrian
4 Respostas
+ 2
Similar answer as CSS then. Javascript, as an engine, will often try to Automatically Insert Semicolon. I always use the semi-colons, simply because it can cause dire consequences in your code if you don't. Small, light codes may work without a semi-colon, but I would get in the habit of using them for more complex codes. Does this help?
4th Jun 2019, 10:53 PM
River
River - avatar
+ 2
Your question isn't totally clear, but usually it's to mark off a line of code. CSS body{ color: black; margin: 0; padding: 0 } Basically to tell the system that you are moving onto another 'command'. However, if you mean Python, I only have a rudimentary knowledge of that, and can't answer it. It pays to be more specific in questions 😁
4th Jun 2019, 10:38 PM
River
River - avatar
0
River, thanks for your answer. I ment, in Java Script.
4th Jun 2019, 10:41 PM
Adrian
0
Thanks again River, for your answer. Yes it helps.
4th Jun 2019, 10:57 PM
Adrian