1var obj = {a: "a", b: "b" /*...*/};
2var string = JSON.stringify(obj);
3// OUTPUT:
4// "{'a':'a', 'b':'b'}"
1var myNumber=120;
2var myString = myNumber.toString(); //converts number to string "120"
1<script type="text/javascript">
2 var num=213;
3 document.write("Output : " + num.toString(2));
4</script>
5