Question: When I compile my Arduino sketch(language C), I get the error:

```
sketch_oct30b:2: error: ‘e’ was not declared in this scope
sketch_oct30b:2: error: ‘z’ was not declared in this scope

```

This is the piece of code, `char z` is in the first line of the whole code.

```
char z[4] = "z_0";
int e = 0;

char delta(e, z) {}

```

From what I found out this error means that the programmer forgot some declaration, but I don't really see where I forgot to declare `e` or `z`.
Can someone tell me where I forgot to declare?

Answer: 
Ok, so apparently the issue was not with the prop/attr toggling "checked", but rather the property updating when viewing the browser's developer tools. When I inspect the checkbox, the checked property ALWAYS stays "checked", however the following code works to determine if the checkbox is actually checked or not (@War10ck's suggested code):

```
$('#check_box_2').is(':checked')

```
Use jQuery [.prop()](http://api.jquery.com/prop/) instead of [.attr()](http://api.jquery.com/attr/)

Set the `.prop("checked", true)`. This is one of the greatest benefits of `.prop()` over `.attr()` since `.prop()` can set values that are non-strings.

Here's a working example on how to use it:

```js
setInterval(function() {
  if ($("#chkBox1").prop("checked"))
    $("#chkBox1").prop("checked", false);
  else
    $("#chkBox1").prop("checked", true);
  }, 1000);
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input type="checkbox" value="Test" id="chkBox1" checked />
```