This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
Dean Tribble (via Rob Palmer) has come up with a neat trick to create constants whose values are strings with their names. With a minor change, we can use it to set up symbol-valued constants.
This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
Dr. Axel Rauschmayer | Sciencx (2022-01-26T00:00:00+00:00) Setting up symbol-valued constants via proxies. Retrieved from https://www.scien.cx/2022/01/26/setting-up-symbol-valued-constants-via-proxies/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.