JavaScript

24
Nov

OddEven Sample TypeScript Code

9
Nov

Fizz Buzz Sample TypeScript Code

Code:

class FizzBuzz {
    
    doFizzBuzz(value: number) : string {

        var result = "";
        if (value <= 0) return result;

        if (value % 3 === 0) result = "fizz";
        if (value % 5 === 0) result += "buzz";