today i saw a JS code with a strange syntaxe for me : "?.", for example in :
function getSortDirection({columnName}) {
return sortings?.[0].sortBy === columnName ? sortings?.[0].isSortDescending ? 'desc' : 'asc' : "none";
}
the sortings[0].sortBy
is trivial but sortings?.[0].sortBy
not.
Any explanation are welcomed