Javascript examples for JSon:JSon String
Return {hello: "world"}[something]
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w ww .j a va2 s.c o m*/ function parseMessage(error) { return { 15: 'Faulted' }[error]; } console.log(parseMessage(15)) } </script> </head> <body> </body> </html>