Test name | Executions per second |
---|---|
Try/catch | 2201943.8 Ops/sec |
Without try/catch | 2214913.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"}');