Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Object JavaScript - Loading and Running the dependency
<!DOCTYPE html>
<title>Simple RequireJS Sample</title>
<script src="scripts/require.js"></script>
//By default load any module IDs from Scripts folder
baseUrl: 'Scripts'
// load the discount.js and use that module to calculate employee discount
function (discount) {
var d = discount.calculateDiscount('employee');
document.write('employee discount is ' + d + '%');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment