function getRandom() { return Math.random() } class Test { static random = getRandom(); static getRandom() { return Test.random; } } console.log(Test.getRandom()) console.log(Test.getRandom()) console.log(Test.getRandom())