virtual-labs-archive / physical-chemistry-iiith

Other
1 stars 64 forks source link

Missing semicolon. (semi) #45

Open BSravanthi opened 5 years ago

BSravanthi commented 5 years ago

JavaScript is unique amongst the C-like languages in that it doesn't require semicolons at the end of each statement. In many cases, the JavaScript engine can determine that a semicolon should be in a certain spot and will automatically add it. This feature is known as automatic semicolon insertion (ASI) and is considered one of the more controversial features of JavaScript. On the first line, the JavaScript engine will automatically insert a semicolon, so this is not considered a syntax error. The JavaScript engine still knows how to interpret the line and knows that the line end indicates the end of the statement. In the debate over ASI, there are generally two schools of thought. The first is that we should treat ASI as if it didn't exist and always include semicolons manually. The rationale is that it's easier to always include semicolons than to try to remember when they are or are not required.

//Bad:
var name = "ESLint" 

//Good:
var website = "eslint.org";

Please refer to the following link to fix similar issues. https://app.codacy.com/app/BSravanthi/physical-chemistry-iiith/issues?&filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6W251bGxdfSx7ImlkIjoiQ2F0ZWdvcnkiLCJ2YWx1ZXMiOlsiQ29kZSBTdHlsZSJdfSx7ImlkIjoiTGV2ZWwiLCJ2YWx1ZXMiOltudWxsXX0seyJpZCI6IlBhdHRlcm4iLCJ2YWx1ZXMiOlsxNTU1XX0seyJpZCI6IkF1dGhvciIsInZhbHVlcyI6W251bGxdfSx7InZhbHVlcyI6W119XQ==

somashekhar31 commented 5 years ago

commit id:https://github.com/virtual-labs/physical-chemistry-iiith/commit/5c2643b9e4395ee8a5d739f72bc0749d244afc01 (page 1) commit id:https://github.com/virtual-labs/physical-chemistry-iiith/pull/52/commits/34646b1cd9645d9ce4e56fcaabbd8491f7c94abe commit id:https://github.com/virtual-labs/physical-chemistry-iiith/pull/52/commits/a20935150477cea14ef63a7f5d365ff345e5f6a6 (page 2)

snehitharangu commented 5 years ago

Valid fix @somashekhar31

samhithavootkoor commented 5 years ago

validated-2 @somashekhar31