Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sprint-1/3-mandatory-interpret/2-time-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ console.log(result);

// Ans: the variable result represent total movie lenght, Movie duration_hr_min_sec would be better name.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Javascript, the convention is to use "camel case". This would be perfect for a language like Python 🙂

Could you suggest one in camel case?

See this article: link


// In a "camel case" the following options would be better names
// 1. MovieDurationHrMinSec
// 2. TotalMovieSpan
// 3. TotalMoviePeriod

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what we call PascalCase (the first letter is capatalised) which is not quite right for this

  • camelCase
  • PascalCase
  • snake_case
  • kebab-case

Each language will have a convention of using a certain case - for Javascript it's camelCase


// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer

// Ans: I have tried with different values and it seems to work for all values, but it needs to validate to avoid entering negative values
// I inserted --3500 and returned 0: -58: -20 which does not mean real time representation.


// Corrected typo reminder -----> remainder
// Suggested better names in "camel case" a convention in Javascript