Skip to content

Instantly share code, notes, and snippets.

@Rudxain
Last active August 26, 2022 07:51
Show Gist options
  • Save Rudxain/43aa9dcebc434c61e3b0353bbfb4e65d to your computer and use it in GitHub Desktop.
Save Rudxain/43aa9dcebc434c61e3b0353bbfb4e65d to your computer and use it in GitHub Desktop.
How to assert dominance in Javascript
'use strict'
const assert = function(bool, msg) {if (!bool) throw new Error(msg)}
let dominance = true
assert(dominance, 'dominance not asserted')
//I'm so based that I purposefully ignored `console.assert`
console.log('dominance successfully asserted lol')
dominance = false //dominance doesn't last forever
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment