Difference between 'const' and 'define()'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason

    Difference between 'const' and 'define()'

    What is the difference between 'const' and 'define()' ? When would I
    prefer using 'const' over 'define', or vice versa? It seems if i do:

    const secondsInMinute = 60;
    define("seconds InMinute", 60);

    Aren't these two the same thing?

    - Jason

Working...