5 | | Right, however JavaScript works quite differently than PHP. It is a prototype-based language, i.e. any function, object (class), method, etc. can be replaced/overridden at any time by any script, even the built-in functions. There isn't such thing as `Fatal error: Cannot redeclare function_name() (previously declared in....)` in JS. |
| 5 | Right, however JavaScript works quite differently than PHP. It is a prototype-based language, i.e. most functions, objects (classes), methods, etc. can be replaced/overridden at any time by any script, even the built-in functions. There isn't such thing as `Fatal error: Cannot redeclare function_name() (previously declared in....)` in JS. |