Skip to content

Instantly share code, notes, and snippets.

@bga
bga / [fun] various forms of ternary operator in JavaScript.js
Created March 7, 2012 15:10
[fun] various forms of ternary operator in JavaScript
// add your variants of
a ? b : c
// in comments :)
// a is boolean
// b and c - any type
// lazy evaluation isnt important
// KrautZip
// Copyright (c) 2010 Berlinbernd
// Released under the GNU Lesser General Public License
// http://www.gnu.org/copyleft/lgpl.html
//
// ==UserScript==
// @name KrautZip
// @namespace http://dieweltistgarnichtso.net
// @description Zip redundant content.
// @include http://krautchan.net/*