Skip to content

Commit a891eb6

Browse files
0.js file prettier formatting
1 parent 3d39a87 commit a891eb6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • Sprint-3/1-key-errors

‎Sprint-3/1-key-errors/0.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
/** @format */
2+
13
// Predict and explain first...
2-
// =============> write your prediction here :there is a syntax error because string is decleared two tiimes.
4+
// =============> write your prediction here :there is a syntax error because string is decleared two tiimes.
35

46
// call the function capitalise with a string input
57
// interpret the error message and figure out why an error is occurring
@@ -11,15 +13,13 @@
1113
// }
1214
// capitalise("Ramesh");*/
1315

14-
1516
// =============> write your explanation here
1617
// to resolve this error we need to declared a new variable in step 9. after declaring a new variable it runs and give outputs.
1718
//which first letter is capital and other are remain same.
1819
// =============> write your new code here
1920
function capitalise(str) {
20-
let ab = `${str[0].toUpperCase()}${str.slice(1)}`;
21-
return ab;
21+
let ab = `${str[0].toUpperCase()}${str.slice(1)}`;
22+
return ab;
2223
}
23-
capitalise("ramesh");
24+
capitalise('ramesh');
2425
// The correct code is given above i pass a value ramesh after running this function the output become Ramesh.
25-

0 commit comments

Comments
 (0)