toString() function does not exist?

How do we convert any value to a string? value.toString() causes a typerror.

In Typescript you can use .toString() and String(value)
For example

let val=20
let convert= String(val)// return "20" without "


let val=20
let convert= val.toString() // return "20" without "

but the value is a JSON 

you can use

let val=[20,51]
let convert= JSON.stringify(val) // return " '20','51' "