how to solve Fibonacci, prime and composite number and factorial using a single static class in typescirpt.
working link ------------- https://stackblitz.com/edit/typescript-be1art these are some frequently asked question such as prime numbers, factorial and Fibonacci series for an interview purpose. I am trying to solve these question using a single static class in typescript. here the whole code of my static class where I am using a single class to solve these problem's class MathProblem { //Fibonacci series-------------------- static Fibonacci ( max ) { let a : number = 0 ; let b : number = 1 ; let f : number = 1 ; let series =[]; for ( let i = 0 ; i <= max ; i ++) { if ( i === 0 ) { f = 0 ; } else if ( i === 1 ) { f = 1 ; } else { f = a + b ; a = b ; b = f ; } series . push ( f ); } return series ; } //factorial----------------...