Need help with Basic I/O function

Need help with Basic I/O function

Can I get some help here? I am a bit of a newbie to nodejs but I know enough I think to do this.  I can get this to work on nodejs locally, however, as a basic i/o function I get an error.   Basically, when I invoke the basic function I would like to run a function that invokes other functions or modules and once its completed return something in the output.   however, I get this error (below is my example code)

the error I get is 
{
    "error": "ReferenceError: variablea is not defined\n    at module.exports (/catalyst/index.js:15:19)\n    at CUSTOMER_ROUTE (/var/runtime/index.js:143:9)\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)"
}
  1. const catalyst = require('zcatalyst-sdk-node');
    module.exports = (context, basicIO) => {
    const app = catalyst.initialize(context);
    //This app variable is used to access the catalyst components.
    //You can refer the SDK docs for code samples.


    function runfunction() {

    var variablea = 'I am a variable';

    }

    runfunction();
    basicIO.write(variablea);

    context.close();
    }


    • Announcements

    • Important Announcements in Support for Catalyst Features

      Hello Catalyst Users, This announcement is to bring to your notice some of the recent updates in our support for various Catalyst components, to ensure that your existing Catalyst applications function properly. You can continue to build robust applications
    • Introducing Catalyst 2.0, the simplest cloud-based pro-code development platform.

      Dear Catalyst Community, We are beyond thrilled to present you Catalyst 2.0—the new-age, pro-code development platform that redefines the way you build, deploy, and scale apps. Catalyst 2.0 is not a mere upgrade, but a significant leap into the future
    • Set budgets to optionally disable your Catalyst production environment

      Hello all,    We are pleased to inform you that you can now configure the automatic disabling of a project's production environment upon reaching a specified budget's threshold. Budget alerts in Catalyst facilitate setting usage limits in amounts or Catalyst
    • #CatalystServerless Hackathon 2022

      We are pleased to announce #CatalystServerless Hackathon with prizes worth $5000 up for grabs. Create a working prototype aimed to solve a critical business issue using Catalyst and stand a chance to win exciting prizes. The Hackathon will happen in 3
    • Share your interest to participate in the #CatalystServerless Blogathon

      Hi, we are working on announcing the next edition of the #CatalystServerless Blogathon. Please fill up this form to stay posted on all updates related to the Blogathon. https://zfrmz.com/JN9ChxPU9JQpPgB1vRp8

      Catalyst Community