Skip to content

Instantly share code, notes, and snippets.

@mfortunat0
Last active June 28, 2021 01:37

Revisions

  1. mfortunat0 renamed this gist Jun 28, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. mfortunat0 created this gist Jun 22, 2021.
    6 changes: 6 additions & 0 deletions example-assert.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    console.assert(1 > 2, "Numero inferior a 2") // Ira exibir uma string 'Numero inferior a 2'
    console.assert(1 > 2, { message:"Numero inferior a 2" }) // Ira exibir um objeto uma unica propriedade message

    // Outro exemplo
    const data = { name: "carlos", year: 20 }
    console.assert(data.lastName, "Nao possui propriedade lastName")