objectExperiment
Script
v3
Fork
1
export
let
objectExperiment
=
(
)
=>
new
Proxy
(
{
a
:
1
,
b
:
2
}
,
{
get
(
target
,
prop
,
reciever
)
{
if
(
prop
===
"b"
)
{
return
3
}
return
target
[
prop
]
}
}
)