Backbone.js: `extend` undefined?

The issue was that I wasn’t loading underscore.js. I totally missed that dependency in the docs. Duh.

Further clarification from @tjorriemorrie:
I had underscore, but loaded in the wrong order, first load underscore (guess that is what ‘dependency’ means 🙂


Further Clarification just in case this isn’t obvious. The order that things are loaded in JavaScript relates to the order the show up on the page. To load underscore first, be sure that the script tag including it comes before the one loading backbone. Like this:

<script src="https://stackoverflow.com/questions/4875743/underscore-1.4.4-min.js"></script>
<script src="backbone-1.0.0-min.js"></script>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)