title: strange JS syntax, what does it mean?
body: <p>I recently came across this strange JavaScript code:</p>
  
  <pre><code>export type ImageSource = {
    id: string,
    URI: string,
    thumbnail: string,
    title: ?string,
    description: ?string
  }
  
  type Props = {
    images: Array&lt;ImageSource&gt;,
    onPressImage?: Function,
    topMargin?: number,
    closeText?: string,
    infoTitleStyles?: Animated.View.style,
    infoDescriptionStyles?: Animated.View.style,
    enableTilt?: boolean
  }
  </code></pre>
  
  <p>If I understand it correctly, string is a data type, but can someone explain, what is the difference between string and ?string.</p>
  
  <p>Also, what does the following line of code mean:</p>
  
  <pre><code>topMargin?: number,
  </code></pre>
  
  <p>I've got it from a sample react-native app, I'm assuming, it signifies an optional property, but I can't find any explanation when googling for it. </p>