Chevtek.io
  • Home
  • Github
  • Stack

JavaScript

A collection of 11 posts

Simple JavaScript profiling timer script.
JavaScript

Simple JavaScript profiling timer script.

I had a need to write a small script that I could easily use to time bits of JavaScript code in order to profile it. Chrome's dev tools has lots of useful profiling

  • Alex Ford
    Alex Ford
2 min read
Getting Too Modular
JavaScript

Getting Too Modular

Over the last year or so I've fallen in love with node and even JavaScript as a language (the good parts, of course). I was very pleased to find that the node community

  • Alex Ford
    Alex Ford
6 min read
What are callbacks and promises?
JavaScript

What are callbacks and promises?

To explain promises we must first explain callbacks. A callback function is simply a function you pass into another function so that function can call it at a later time. This is commonly

  • Alex Ford
    Alex Ford
6 min read
JavaScript

9 JavaScript Tips You May Not Know

NOTE: This is a blog post from 2006 by a now 34 year old programmer named Ayman Hourieh. I found links to his site for an article I wanted to read but his

  • Alex Ford
    Alex Ford
9 min read
JavaScript

String Replacement is Natively Supported by console.log()

I recently found out that console.log() in JavaScript natively supports string replacement using %s as a placeholder and I wanted to share. console.log('My name is %s.', 'Alex'); // My name

  • Alex Ford
    Alex Ford
1 min read
JavaScript

JavaScript Partial Application with bind()

Sometimes the subtle ways other people use JavaScript puts a smile on my face. I'm getting started with the Mongoose driver for MongoDB; while I was reading the quick start guide I came

  • Alex Ford
    Alex Ford
2 min read
JavaScript

Monkey Patching

There are plenty of moments as a developer when you do something so clever that you just have to crack a little smile and be proud of yourself for a bit. When I'm

  • Alex Ford
    Alex Ford
2 min read
I Finally Understand Closures!
JavaScript

I Finally Understand Closures!

Since I started using Node I've fallen in love with JavaScript as a language. Before Node I liked JavaScript well enough, but without my trusty JQuery library it never impressed me much at

  • Alex Ford
    Alex Ford
3 min read
How to Implement Auto-Save in your Web App
JavaScript

How to Implement Auto-Save in your Web App

Have you ever accidentally unfocused the textarea you were typing in and then hit backspace only to have the entire browser go back a page and blow away everything you were typing? Losing

  • Alex Ford
    Alex Ford
3 min read
JQuery

Using custom jQuery events will save you a lot of headaches.

If you use JQuery then you have likely already done events like this: $('button').click(function (e) { alert('hello!'); }); JQuery's event wrapper is very useful and it allows you to easily bind

  • Alex Ford
    Alex Ford
2 min read
JQuery

Using Self-executing Functions to Preserve Dollar Sign compatibility in JQuery

This is a very simple concept and is mostly common knowledge but I recently came across a need to use it fairly extensively and figured I would share. At my place of work

  • Alex Ford
    Alex Ford
1 min read
Chevtek.io © 2022
Latest Posts Facebook Twitter Ghost