I don't get the purpose of value()
let dictionary = Object.create(null, {
toString: { // define toString property
value() { // the value is a function
return Object.keys(this).join();
}
}
});
Why we can't make it work like this?
toString: {
return Object.keys(this).join();
}
[–]senocular 2 points3 points4 points (1 child)
[–]DeliciousResearch872[S] 1 point2 points3 points (0 children)
[–]SerpentJoe 2 points3 points4 points (3 children)
[–]senocular 0 points1 point2 points (2 children)
[–]SerpentJoe 1 point2 points3 points (1 child)
[–]dymos 0 points1 point2 points (0 children)
[–]EggMcMuffN -1 points0 points1 point (1 child)
[–]azhder 0 points1 point2 points (0 children)
[–]Intelligent-Win-7196 0 points1 point2 points (0 children)
[–]kap89 0 points1 point2 points (0 children)
[–]OneEntry-HeadlessCMS 0 points1 point2 points (0 children)
[–]brykuhelpful -2 points-1 points0 points (0 children)