Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
code {
background-color: lightgray;
padding: 2px;
border-radius: 3px;
border: 1px gray;
li {
margin-bottom: 3px;
<p>Welcome to my esolang ButtonLang!</p>
<button onclick="up()">+</button>
<p id="number">0</p>
<button onclick="down()">-</button>
<p>In ButtonLang, you are both the program and the interpreter. You may press the buttons to execute the ButtonLang program you want to.</p>
<li><code>+</code> Increment the accumulator.</li>
<li><code>-</code> Decrement the accumulator.</li>
number = document.getElementById("number");
function up() {
number.innerHTML = (parseInt(number.innerHTML) + 1).toString();
function down() {
number.innerHTML = (parseInt(number.innerHTML) - 1).toString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment