# Supported mutators

Stryker supports a variety of mutators, which are listed below. Do you have a suggestion for a (new) mutator? Feel free to create an issue!

### Binary operator

Original | Mutated |
---|

a + b | a - b |

a - b | a + b |

a * b | a / b |

a / b | a * b |

a % b | a * b |

a < b | a <= b |

a < b | a >= b |

a <= b | a < b |

a <= b | a > b |

a > b | a >= b |

a > b | a <= b |

a >= b | a > b |

a >= b | a < b |

a == b | a != b |

a != b | a == b |

a === b | a !== b |

a !== b | a === b |

### Boolean Substitutions

Original | Mutated |
---|

true | false |

false | true |

! | |

### Logical operator

Original | Mutated |
---|

a && b | a || b |

a || b | a && b |

### Unary operator

### Update operator

Original | Mutated |
---|

a++ | a-- |

a-- | a++ |

++a | --a |

--a | ++a |

### Remove conditionals

Original | Mutated |
---|

for (var i = 0; i < 10; i++) { } | for (var i = 0; false; i++) { } |

while (a > b) { } | while (false) { } |

do { } while (a > b); | do { } while (false); |

if (a > b) { } | if (true) { } |

if (a > b) { } | if (false) { } |

var x = a > b ? 1 : 2; | var x = true ? 1 : 2; |

var x = a > b ? 1 : 2; | var x = false ? 1 : 2; |

### Array Declarator

Original | Mutated |
---|

new Array(1, 2, 3, 4) | new Array() |

[1, 2, 3, 4] | [ ] |

### Block statement

This mutator removes the content of every block statement. For example the code:

```
function saySomething() {
console.log('Hello world!');
}
```

becomes:

```
function saySomething() {
}
```