Help with JS console.log()

Hi - I am battling with the below. I am so not schooled enough in js. Please can someone help.

I am implementing PUSH Notifications in my app (using PushAlert). I have got the 1st part working fine (asking the user to accept ). The second part is to capture the subscriber id into a php variable. This where I am stumped. Please can some show me how I get

Below is the code which has been shared with me by PushAlert.
Part one is what I have working.
Part two is what I am dying with.

Part1:

script type=“text/javascript”>
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src = “https://cdn.pushalert.co/integrate_c0108a215df8f0f09b1b72a6bfa87417.js”;
s.parentNode.insertBefore(g, s);
}(document, “script”));
/script>
!-- End PushAlert -->

Then Part 2:

-script>
(pushalertbyiw = window.pushalertbyiw || []).push([‘onReady’, onPAReady]);

function onPAReady() {
    console.log(PushAlertCo.subs_id); //if empty then user is not subscribed

    //YOUR CODE
}

/script>