+ 2
Is it important using semicolon?
Is it important using semicolon ; ? Because my code below is also working well (without semicolons)ââ var x = 100 console.log(x) Sorry for my bad engish.
5 Answers
+ 8
Yeah, but not in javascript.
It's not necessary to write an` ; `at the end unless you are writing two lines of code in the same line.
I mean
var x = 100
console.log(x); console.log(x+2)
+ 3
MD. Ferdous Ibne Abu Bakar Yeah it's important and the reason why your code is running well is because a lot of IDEs have the automating system wich can run the code without using semicolon .
But it's important to use it in order to get used on it.
Sorry for my bad english toođ
đ
đ
+ 3
Yeah, like Simba says that it's useful in writing 2 codes on the same line, it's true.
But in languages like JAVA it is NECESSARY, without it your code will crash, so keep habit of using semicolonsđđ»
+ 2
Thank you all đ
+ 1
In low-level languages like C, the statements are separated by a semicolon instead of a new-line, unlike Python.