mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 21:30:58 +00:00 
			
		
		
		
	
		
			
	
	
		
			20 lines
		
	
	
	
		
			327 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
	
		
			327 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|   | function assert(x) { if (!x) throw 1; } | ||
|  | 
 | ||
|  | try { | ||
|  |     var x = 1; | ||
|  | 
 | ||
|  |     assert(x === 1 ? true : false); | ||
|  |     assert(x ? x : 0); | ||
|  |     assert(1 < 2 ? (true) : (false)); | ||
|  | 
 | ||
|  |     var o = {}; | ||
|  |     o.f = true; | ||
|  |     assert(o.f ? true : false); | ||
|  | 
 | ||
|  |     assert(1 ? o.f : null); | ||
|  | 
 | ||
|  |     console.log("PASS"); | ||
|  | } catch (e) { | ||
|  |     console.log("FAIL: " + e); | ||
|  | } |