Implementing Photon Engine SDK for multiplayer

Hi, I’m trying to use Photon Engine as a solution to my multiplayer needs. However, I am unsure of how to go about this as I’m new with Javascript. I’d like to know if anyone here can point me in the right direction? Thanks!

Apparently this was their example code for their App.js, but I’m unsure how to transform this into the Cocos Creator context: