Features of JavaScript Non-Strict Mode

By: Dusty Arlia
Published on Wednesday, May 8, 2013, 06:58 AM
Last Updated on Wednesday, July 08, 2015 at 10:31 PM
Total Updates: 3

  • Implied declaration is used when assigning a value to an identifier that is not declared.
  • Functions invoked as functions pass the global object as their this value.
  • Assignments to nonwritable properties and attempts to create new properties on nonextensible objects fail silently.
  • Code passed to eval() can declare variables and define functions in the caller's scope.
  • The arguments object in a function holds the values passed to the function and the values stored in the arguments object are dynamically linked to the parameter values. For example:
    document.write(x);                                       //writes value of first parameter
    arguments[0] = "A string argument passed to a function"  //changes value of the first parameter
    document.write(x);                                       //now write A string argument passed to a function
  • If the delete operator is followed by an unqualified identifier like a variable, function, or function parameter name, then this delete expression evaluates to false, but no errors are thrown.
  • If you try to delete a nonconfigurable property, the JavaScript interpreter will not throw any errors, but the delete operation will fail and the delete expression will evaluate to false.
  • There is no error for an object literal that has two or more properties with the same name.
  • No errors are thrown if a function declaration has two or more parameters with the same name.
  • Octal literals are allowed in certain implementations.
  • arguments.caller and arguments.callee are defined in some implementations.