Search
 
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
Name
8+6 =