Hi, I need help to draw a uml diagram from a js code but I don't know how. Can someone of you show me an example from a code I post? because I need that for an exam. This is just a part but feel free to use other example. Thanks
The code:
Code:
(function(library, img, cjs) {


    createjs.mainCodeFunction = function() {
        var scorePerShot = 10;
        var scorePerShotMiss = 5;
        var showPlayAgain = true //to show or not to show paly again button after win/loss
        var levelArray = [
            [1 /*how much baskets per level*/ , 1 /*player number ,possibility to add more players in afuture*/ , 45000 /*level time millsec*/ , true /*is bonus round available*/ , 10000 /*  bonus round time milisec*/ , 6000 /*milisecodns on how fast board moves from on side to another for currentlevel*/ ],
            [12 /*how much baskets per level*/ , 1 /*player number ,possibility to add more players in afuture*/ , 45000 /*level time millsec*/ , true /*is bonus round available*/ , 10000 /*  bonus round time milisec*/ , 5000 /*milisecodns on how fast board moves from on side to another for currentlevel*/ ],
            [13 /*how much baskets per level*/ , 1 /*player number ,possibility to add more players in afuture*/ , 45000 /*level time millsec*/ , true /*is bonus round available*/ , 10000 /*  bonus round time milisec*/ , 4000 /*milisecodns on how fast board moves from on side to another for currentlevel*/ ],
            [14 /*how much baskets per level*/ , 1 /*player number ,possibility to add more players in afuture*/ , 45000 /*level time millsec*/ , true /*is bonus round available*/ , 10000 /*  bonus round time milisec*/ , 3000 /*milisecodns on how fast board moves from on side to another for currentlevel*/ ]

        ]

        mainParentLibrray.titleScreen.addEventListener("mousedown", startScreen);
        createjs.Touch.enable(stage);
        stage.mouseMoveOutside = true;
        mainParentLibrray.level_prompt.addEventListener("mousedown", startLevel);
        mainParentLibrray.level_prompt.visible = false;
        mainParentLibrray.playAgain.visible = false;
        mainParentLibrray.lostMc.visible = false;
        mainParentLibrray.winMc.visible = false;
        mainParentLibrray.lostMc.addEventListener("mousedown", lostClick)
        mainParentLibrray.winMc.addEventListener("mousedown", winClick)
        mainParentLibrray.playAgain.addEventListener("mousedown", playAgainClick)
        mainParentLibrray.bonusPoints.visible = false;
        mainParentLibrray.before_bonus_prompt.visible = false;
        mainParentLibrray.before_bonus_prompt.addEventListener("mousedown", startBonus)
        mainParentLibrray.basket1.visible = false;
        mainParentLibrray.basket2.visible = false;
        mainParentLibrray.basket3.visible = false;
        var side = 0;
        var currentLeve = 0;
        var player;
        var playerNR = 1;
        var madeBasket = 0;
        var score = 0;
        var levelSec;
        var bonSec;
        var tweenShouldEnd = false;
        var currentBonusBasket = mainParentLibrray.basket1;
        var bonus = false;
        var isNormal = true;
        var bonustimerInterVal;
        var startX = mainParentLibrray.basket.x
        var basketBoardSpeed;
        //Start Screen set
        function startScreen() {
            side = 0;
            basketBoardSpeed = levelArray[currentLeve][5];
            mainParentLibrray.basket.visible = true;
            mainParentLibrray.basket.x = startX;
            mainParentLibrray.player1.x = -200;

            mainParentLibrray.player1.visible = false



            bonus = false;
            createjs.shoot = true;
            madeBasket = 0

            mainParentLibrray.score_txt.text = score;
            mainParentLibrray.made_baskets_txt.text = madeBasket;
            mainParentLibrray.titleScreen.visible = false;
            if (levelArray[currentLeve][1] == 4) {
                playerNR = Math.floor((Math.random() * 3) + 1)
            } else {
                playerNR = levelArray[currentLeve][1]
            }

            mainParentLibrray.basket.highlight.visible = false; //Basket higlifhts -> not highlited
            player = mainParentLibrray["player" + playerNR]
            player.visible = true;
            player.gotoAndStop(playerNR - 1);
            mainParentLibrray.level_prompt.level_txt.text = "LEVEL: " + (currentLeve + 1)
            mainParentLibrray.level_prompt.instructions.text = "Make at least " + levelArray[currentLeve][0] + " baskets before time runs out to go to the next level. You have " + (levelArray[currentLeve][2] / 1000) + " seconds";

            mainParentLibrray.level_prompt.visible = true;
            mainParentLibrray.level_prompt.gotoAndStop(playerNR - 1);

        }
        //Level start -> player -> ball -> basket moving
        function startLevel() {
            mainParentLibrray.bball.gotoAndStop(0);
            mainParentLibrray.bball.visible = false;

            mainParentLibrray.level_prompt.visible = false;
            levelSec = (levelArray[currentLeve][2]) / 1000
            mainParentLibrray.time_txt.text = levelSec;
            timerInterVal = setInterval(timeCount, 1000)
            mainParentLibrray.titleScreen.visible = false;
            stage.addEventListener("stagemousemove", mouseMove);
            isNormal = true;
            tweenShouldEnd = false;
            addTweens()
            stage.addEventListener("mousedown", shootAnimationStart);
            setTimeout(setShoot, 50)
        }

        function setShoot() {

            createjs.shoot = false;
        }

        function lostClick() {



        }

        function winClick() {

        }

        function playAgainClick() {
            location.reload();
        }

        function timeCount() {
            levelSec--;
            mainParentLibrray.time_txt.text = levelSec;
            if (levelSec <= 0) {
                isNormal = false;
                tweenShouldEnd = true;
                createjs.Tween._tweens = [];
                clearInterval(timerInterVal)
                stage.removeEventListener("stagemousemove", mouseMove);
                stage.removeEventListener("mousedown", shootAnimationStart);

                if (levelArray[currentLeve][0] > madeBasket) {
                    doLostScreen()
                } else {


                    if (levelArray[currentLeve][3]) {
                        console.log("bonus round is true");
                        doBonusLevel();
                    } else {

                        doNextLevel();
                    }
                }
            }
        }