Skip to content

Instantly share code, notes, and snippets.

View bagherani's full-sized avatar
🇳🇱

Mohi Bagherani bagherani

🇳🇱
View GitHub Profile
@alexhawkins
alexhawkins / nativeJavaScript.js
Last active November 1, 2024 12:00
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests
@maxbbn
maxbbn / canvas_line_chart_simple.html
Created June 16, 2012 05:54
simple canvas line chart
<!doctype html>
<html>
<head>
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
(function () {
function getPoints(data) {
var points = [];