Open BSravanthi opened 5 years ago
Commit id: 431ffb5-(1) Commit id: 5bc4a3a-(2) Commit id: 97c2be9-(3)
All the curly braces for if...else statements are included.
Exp 2 - Commit id : 0075c8b7555b6b404a6b6365f89309c72e73dfcc Exp 5 - Commit id : 127f2e97f2665b66862e6225d4c4f884d2618d88 Exp 7 - Commit id : a39dc2a0b62f80e68b8e383322f9297f6c46863b
Please validate.
valid fix @DevikaBoddu
Valid fix @ShivaniKomandury
Valid fix @DevikaBoddu
JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be the best practice to never omit curly braces around blocks, even when they are optional because it can lead to bugs and reduces code clarity. So the following:
Can be rewritten as:
Please refer to the following link to fix similar issues. https://app.codacy.com/app/BSravanthi/pattern-recognition-iiith/issues?&filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6W251bGxdfSx7ImlkIjoiQ2F0ZWdvcnkiLCJ2YWx1ZXMiOlsiQ29kZSBTdHlsZSJdfSx7ImlkIjoiTGV2ZWwiLCJ2YWx1ZXMiOltudWxsXX0seyJpZCI6IlBhdHRlcm4iLCJ2YWx1ZXMiOlsxNjYyXX0seyJpZCI6IkF1dGhvciIsInZhbHVlcyI6W251bGxdfSx7InZhbHVlcyI6W119XQ==