Skip to content

Commit

Permalink
Remove unnecessary console.log (#2138)
Browse files Browse the repository at this point in the history
There are already console logs in the parseAndLog function itself. parseAndLog(json) and parseAndLog(invalidJson) will just print 2 undefined in plus
  • Loading branch information
vargaeric committed Nov 13, 2022
1 parent 572c843 commit 58f9e7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guide/getting-started.md
Expand Up @@ -140,8 +140,8 @@ const parse = ajv.compileParser(schema)
const json = '{"foo": 1, "bar": "abc"}'
const invalidJson = '{"unknown": "abc"}'

console.log(parseAndLog(json)) // logs {foo: 1, bar: "abc"}
console.log(parseAndLog(invalidJson)) // logs error and position
parseAndLog(json) // logs {foo: 1, bar: "abc"}
parseAndLog(invalidJson) // logs error and position

function parseAndLog(json) {
const data = parse(json)
Expand Down

0 comments on commit 58f9e7f

Please sign in to comment.