DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
optional chaining
const array = [1,2,3,4,5]; let arrItem = array?.[4]; console.log(arrItem); /// 5
Source by www.typescriptlang.org #
PREVIOUS
NEXT
Tagged:
#optional
#chaining
ADD COMMENT
Topic
COMMENT
Name
8+6 =
Submit