When I am trying out some object destruction syntax in some browser consoles, something unexpected happened. Firstly I entered
action = {
type: "SET_APPS_UI_REVERT",
device: 23456,
managedApps: "12345"
}
and then
( { type, status, appsInfo, device,managedApps,appName } = action);
lastly
status
So both chrome and firefox decided to give me an "undefined"
that is a string, rather than a undefined value, while edge would give me an usual undefined
. However, when I typed
const { type, status, appsInfo, device,managedApps,appName } = action
and then
status
in edge, it gives me a ""
rather than undefined
.
Is this results of some browser inconsistency? Or actually some bugs?
Screenshots are below
chrome-66-0-3359-181-no-const.PNG
edge-41-16299-402-0-with-edgehtml-16-16299-no-const.PNG