Open main menu

CDOT Wiki β

Changes

User:Dhhodgin

671 bytes added, 20:18, 18 October 2009
no edit summary
[[http://zenit.senecac.on.ca/wiki/index.php/Processing.js Processing.js]] - Active project<br />
<s>[[http://zenit.senecac.on.ca/wiki/index.php/Fennec_and_@font-face Fennec and @font-face]]</s> - on hold
 
=== code blocks ===
Here is a list of code blocks I have written for the processing.js project
==== shorten() ====
Arrays in JS have no type the elements in them can contain any type and do not all have to match. Arrays are also passed by reference which means a reference to the object is passed in not the entire object. so my code creates a new array and then pops one element off the original array and the returned array is put into newary and returned.
 
p.shorten = function( ary ) {
var newary = new Array();
// copy ary into newary
for ( var i = 0; i < size; i++ ) {
newary[ i ] = ary[ i ];
}
newary.pop();
return newary;
}
== Week 1 stuff ==
1
edit