+ 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 Antworten
+ 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.