I have two questions:
1. I have a JavaScript function code:
var firstOrNull = function (elems){
return (elems.length > 0 ) ? elems[0] : null;
}
What does ?
and :
means in this code?
2. What is the meaning of this code:
var stopEvent = function(event){ event.stopPropagation() }