Array Comprehension V8 does not support Array comprehensions$^{809}$. 

Use other methods such as the Array instance methods map() , filter() , or forEach() . 

## Example 

With V8, the following array comprehension is invalid : 

var a = { w: 1, x: 2, y: 3, z: 4 } var arr = [i * i for each (i in a) if (i > 2)] printjson(arr) 

Instead, you can implement using the Array instance method forEach() and the ES5 method Object.keys() : 

var a = { w: 1, x: 2, y: 3, z: 4 } var arr = []; Object.keys(a).forEach( function (key) { var val = a[key]; if (val > 2) arr.push(val * val); }) printjson(arr) 

Note: The new logic uses the Array instance method forEach() and not the generic method Array.forEach() ; V8 does not support Array generic methods. See Array Generic Methods (page 890) for more information. 

Multiple Catch Blocks V8 does not support multiple catch blocks and will throw a SyntaxError . 

## Example 

The following multiple catch blocks is invalid with V8 and will throw "SyntaxError: Unexpected token if" : 

try { something() } catch (err if err instanceof SomeError) { print('some error') } catch (err) { print('standard error') } 

Conditional Function Definition V8 will produce different outcomes than SpiderMonkey with conditional function definitions$^{810}$. 

## Example 

The following conditional function definition produces different outcomes in SpiderMonkey versus V8: 

function test () { if ( false ) { 

