title: Solidity: Data location must be "memory" or "calldata" for return parameter in function
body: <p>I am learning Ethereum dev in Solidity and trying to run a simple HelloWorld program but ran into the following error:</p>
  <blockquote>
  <p>Data location must be &quot;memory&quot; or &quot;calldata&quot; for return parameter in function, but none was given.</p>
  </blockquote>
  <p>My code:</p>
  <pre><code>pragma solidity ^0.8.5;
  
  contract HelloWorld {
    string private helloMessage = &quot;Hello world&quot;;
  
    function getHelloMessage() public view returns (string){
      return helloMessage;
    }
  }
  </code></pre>