0

I am seeing it crop up more and more in code I am going through on a new project (can't share due to contractual reasons) where Ill see something like:

{
 prop1: value$ref,
 $prop2: null
}

I have see ${prop3} before, but never an example without the brackets. Can anyone provide direction as to what the method is, or the operator is or whatever the case?

chris
  • 36,115
  • 52
  • 143
  • 252
  • 1
    It's not a special operator or anything, it's just a plain property or variable name - that's really all there is to it – CertainPerformance Oct 12 '21 at 23:45
  • Its really that simple? lol! so basically if I did `my$varName` thats a valid variable, that I'd access the same way as I would `myvarName` had I done it without the dollar sign? – chris Oct 12 '21 at 23:56
  • Yes.... nothing more to it – CertainPerformance Oct 12 '21 at 23:56
  • It's possible that it is being used as a decorator within your codebase specifically to signify something. Similar to the way that `_prop` often signifies a private property. In which case your question is probably better directed to the people who own it. – lawrence-witt Oct 13 '21 at 00:13

0 Answers0