This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function arrayOfLight(x) { | |
var arr = []; | |
for (var i = 0; i <= x; i++) { | |
arr.push(i); | |
} | |
console.log(arr); | |
} | |
arrayOfLight(5); | |
arrayOfLight(9); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |