Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript object property + multilevel + optional chaining

obj?.prop?.prop
obj?.[expr]?.prop
arr?.[index]?.prop

If a function named 'func' exists or not
obj?.func
If a property named 'func' is a function
obj?.func?.(args)
Source by www.qed42.com #
 
PREVIOUS NEXT
Tagged: #javascript #object #property #multilevel #optional #chaining
ADD COMMENT
Topic
Name
1+1 =