typescript convert number to string code example

Example 1: number to string typescript

var num = new Number(10); 
console.log(num.toString()); 
console.log(num.toString(2)); 
console.log(num.toString(8));

Example 2: angular int to string

var x = 3,
    toString = x.toString(),
    toConcat = x + "";

Example 3: typescript convert numer to string

window.location.hash = ""+page_number; 
window.location.hash = String(page_number);

Example 4: typescript parse to string

window.location.hash = ""+page_number; 
window.location.hash = String(page_number);