function controlHash(hash) {
            // available pages/existing pages
            var pages = ['landing', 'device'];

            // includes dash
            var dash = hash.indexOf("-") != -1;

            // get the splitted hash
            var splitted_hash = hash.split("-");

            // get the rest
            var the_id = splitted_hash[1];

            // check if only contains number
            var isNumber = /^\d+$/.test(the_id);

            // includes numbers
            var number = hasNumber(hash);

            // looping through pages
            for (var i = 0; i < pages.length; i++) {
                if (hash.indexOf(pages[i]) != -1) {
                    return true;
                }
            }

            // return
            return false;
        }
// method for checking if the hash exists
method for checking if the hash exists
method for checking if the hash exists
function controlHash(hash) {
            var pages = ['landing', 'device'];
            var dash = hash.indexOf("-") != -1;
            var splitted_hash = hash.split("-");
            var the_id = splitted_hash[1];
            var isNumber = /^\d+$/.test(the_id);
            var number = hasNumber(hash);
            for (var i = 0; i < pages.length; i++) {
                if (hash.indexOf(pages[i]) != -1) {
                    return true;
                }
            }
            return false;
        }
function controlHash ( hash ) { var pages = [ 'landing' , 'device' ] ; var dash = hash . indexOf ( "-" ) != - 1 ; var splitted_hash = hash . split ( "-" ) ; var the_id = splitted_hash [ 1 ] ; var isNumber = / ^\d+$ / . test ( the_id ) ; var number = hasNumber ( hash ) ; for ( var i = 0 ; i < pages . length ; i ++ ) { if ( hash . indexOf ( pages [ i ] ) != - 1 ) { return true ; } } return false ; }
method for checking if the hash exists
method for checking if the hash exists
// available pages/existing pages // includes dash // get the splitted hash // get the rest // check if only contains number // includes numbers // looping through pages // return