79802113

Date: 2025-10-27 18:04:29
Score: 0.5
Natty:
Report link

It's not correct that -1e9 is commonly used for initialisation, but you will see most of the time developers, including me, prefer as mentioned below:

CASE 1: Initialise with the Minimum value in case we have to find the Maximum value
CASE 2: Initialise with the Maximum value in case we have to find the Minimum value

This is an application across different programming languages, not specific to JavaScript only.

Reasons:
  • No code block (0.5):
Posted by: Wasit Shafi