0
var confirm_origin_button = state.mapProps.origin_marker
      ? {
          first_text: "Confirm your starting point",
          // second_text: "Confirm Origin Stop",
          first_button_text: "Confirm",
          first_button_func: confirm_origin,
        }
      : {
          first_text:
            "Zoom into one of the shaded areas and tap on a marker to select a starting point.",
        };

I don't quite understand what this line is doing. I know that whatever after colon indicates the type of the variable confirm_origin_button, but why is there a question mark (which i think means optional) and a curly bracket after state.mapProps.origin_marker?

Zhao Chen
  • 9
  • 2

0 Answers0