in the F12 console, variable redeclaration resets the variable's value

Confirmed Issue #13575521 • Assigned to Jeff F.

Details

Author
V S.
Created
Sep 4, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
41.16278
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/var
“If you re-declare a JavaScript variable, it will not lose its value.”

entered one line at a time:
var uniqueName = 1; // uniqueName is now 1
var uniqueName; // uniqueName is now undefined, should be 1

Similar code, when run as regular JS, works fine, so this issue seems to be exclusive to the console.

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “James M.”

    Changed Assigned To to “edgedevtoolstri@microsoft.com”

    Changed Assigned To from “edgedevtoolstri@microsoft.com” to “John E.”

    Changed Status to “Confirmed”

    Changed Assigned To from “John E.” to “Jeff F.”

You need to sign in to your Microsoft account to add a comment.

Sign in