Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="calculator">
		<h1>Death By</h1>
		<h2>Rep Calculator</h2>
	<p>A "Death By" is an EMOM (every minute on the minute) exercise where on the first minute you complete one rep of the exercise, the second minute you complete two reps, the third you complete three reps, and so on until you can not complete the reps inside the minute. This calculator will give you the total number of reps completed.</p>
	<div class="align-center">
		<p>Enter number of sets completed</p>
		<input type="number" class="totalRounds">
		<p>You've completed <span class="totalReps">0</span> reps.</p>


                body {
	background: url('');

.calculator {
	max-width: 360px;
	margin: 0 auto;

.totalReps {
	font-weight: bold;

header {
	text-align: center;
	h1 {
		margin-bottom: 0;
	h2 {
		margin-top: 0;
		font-size: 1.2em;

input {
	border: 3px solid #009cd0;
	border-radius: 8px;
	background-image: none;
	background-color: transparent;
	-webkit-box-shadow: none;
	-moz-box-shadow: none;
	box-shadow: none;
	font-size: 1.6em;
	width: 40%;
	text-align: center;

.align-center {
	text-align: center;


                document.querySelector(".totalRounds").addEventListener("change", deathByCalc);

function deathByCalc() {
	var totalReps = 0;
	var totalRounds = Number(this.value);

	for (i = 1; i < totalRounds + 1; i++) {
		var totalReps = i + totalReps;
		document.querySelector(".totalReps").innerHTML = totalReps;