+ 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.
4 Answers
+ 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?
+ 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 đ
0
River, thanks for your answer.
I ment, in Java Script.
0
Thanks again River, for your answer.
Yes it helps.