Skip to content

Instantly share code, notes, and snippets.

@subvind
Last active November 29, 2022 01:32
Show Gist options
  • Save subvind/c43b9cfe07b641392bea55a416aff356 to your computer and use it in GitHub Desktop.
Save subvind/c43b9cfe07b641392bea55a416aff356 to your computer and use it in GitHub Desktop.
Same test as last time except the answers are different this time.
// The special theory of relativity implies that
// only particles with zero rest mass (i.e., photons)
// may travel at the speed of light, and that
// nothing may travel faster.
const nothing = 0
const speedOfLight = Infinity
function specialRelativity () {
return nothing >= speedOfLight
}
let theory = specialRelativity()
console.log(theory)
// The theory of general relativity says that
// the observed gravitational effect between masses
// results from their warping of spacetime.
const spacetime = 1
const warp = -1
function generalRelativity () {
return !!(spacetime + warp)
}
let theory = generalRelativity()
console.log(theory)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment