Test name | Executions per second |
---|---|
try/catch | 2325000.0 Ops/sec |
Without try/catch | 2380658.8 Ops/sec |
<div id="test"></div>
try {
JSON.parse('{"name":"John", "age":31, "city":"New York"}');
} catch(error) {
console.log(error);
}
JSON.parse('{"name":"John", "age":31, "city":"New York"}');