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