JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://github.com/photonstorm/phaser/releases/download/v2.3.0/phaser.min.js"></script>
<div id="game"></div>

JavaScript

console.log(String.fromCharCode('38'));

var game = new Phaser.Game(400, 400, Phaser.AUTO, 'game');

game.mainState = function() {};

game.mainState.prototype = {

    update: function() {
        if (this.game.input.keyboard.lastKey) {
            console.log(this.game.input.keyboard.lastChar);
        }
    }
    
};

game.state.add('main', game.mainState);
game.state.start('main');