Skip to content

Instantly share code, notes, and snippets.

View petazeta's full-sized avatar
🍊

Alberto petazeta

🍊
View GitHub Profile
@gabebear
gabebear / index.html
Last active April 12, 2018 08:19 — forked from RubaXa/index.html
Remove All Children: removeChild vs. innerHTML vs. Range vs. innerText vs. textContent (http://jsbench.github.io/#972d2ef8b8078ade2aef63ab9a899aea) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Remove All Children: removeChild vs. innerHTML vs. Range vs. innerText vs. textContent</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@u01jmg3
u01jmg3 / is-numeric.js
Created November 22, 2016 11:09
JavaScript equivalent of PHP's `is_numeric()`
function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}