I am wondering if it is possible to do something like so:

**HTML**

```
<div id="myspace" class="thing"></div>
<div id="mytable" class="thing"></div>

```

**JS**

```
document.getElementById('my'+this).on('click', function(){
     document.getElementById(this).innerHTML = 'Chosen';
});

```

The logic is that there are two boxes, first being `myspace`, second being `mytable`. Upon clicking one of either, the box's innerHTML will read `"Chosen"`. 

Basically, I would like to see if I can avoid having to write multiple click events and/or if statements. 

JSFiddle 
<https://jsfiddle.net/7cLu9uah/>