title: How do you change the value of a global variable from a function in Kotlin?
body: <p>This code:</p>
  
  <pre><code>var number: Int = 0;
  
  fun increaseNumber(): Int {
      number = 1;
      return number;
  }
  
  fun main(args: Array&lt;String&gt;) {
      println(number);
  }
  </code></pre>
  
  <p>Yields this output:</p>
  
  <pre><code>0
  
  Process finished with exit code 0
  </code></pre>
  
  <p>How do you change the value of a global variable in Kotlin?</p>