Skip to content

Instantly share code, notes, and snippets.

// ex1
console.log('HELLO WORLD');
// ex2
var total = 0;
for (i=2; i < process.argv.length; i++) {
total += Number(process.argv[i]);
}
console.log(total);
function arrayOfLight(x) {
var arr = [];
for (var i = 0; i <= x; i++) {
arr.push(i);
}
console.log(arr);
}
arrayOfLight(5);
arrayOfLight(9);
@seemonz
seemonz / exercises.sql
Created October 13, 2015 00:19
Bookstore SQL Assignment
# exercise 1
SELECT isbn
FROM editions e JOIN publishers p ON (e.publisher_id = p.id)
WHERE (p.name = 'Random House')
# exercise 2
FROM (editions e JOIN publishers p ON (e.publisher_id = p.id))
INNER JOIN books b ON (b.id = e.book_id)
WHERE (p.name = 'Random House')
1: def say_hi(name)
2: "Hi, #{name}"
3: end
4: say_hi(Simon)
5: say_hi("Simon")
6: my_array = [4, 5, 3,7]
7: my_array.sprt
8: my_array.sort
9: my_array
10: my_array.sort!