Skip to content
This repository was archived by the owner on Oct 10, 2026. It is now read-only.

Commit 9e45823

Browse files
author
manuel.depaz
committed
More Simple Samples
1 parent ce41dac commit 9e45823

7 files changed

Lines changed: 43 additions & 10 deletions

File tree

‎P00_CodeSamples/helloWorld_0.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Call the console.log function.
2+
console.log("Hello World");

‎P00_CodeSamples/helloWorld_1.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
// Call the console.log function.
2-
console.log("Hello World");
1+
// Testing call the console.log function with module colors
2+
require('colors');
3+
console.log('Hello World'.rainbow);

‎P00_CodeSamples/helloWorld_4.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var books = [ 'The Fellowship of the Ring',
2+
'The Two Towers',
3+
'The return of the King' ];
4+
5+
function serveBooks() {
6+
7+
var html = '<b>' + books.join('</b><br/><b>') + '</b>';
8+
var books = []; // Intentionally cleaned
9+
}
10+
11+
// Only the first time echo the 3x books

‎P00_CodeSamples/helloWorld_4.php‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
$books = array(
4+
"Myst: The Book of Atrus",
5+
"Myst: The Book of Ti'ana",
6+
"Myst: The Book of D'ni"
7+
);
8+
9+
serveBooks($books);
10+
11+
function serveBooks($books) {
12+
echo $html = '<b>' . join($books, '</b><br/><b>') . '</b>';
13+
$books = array(); // Intentionally cleaned
14+
}
15+
16+
// Always echoes the 3x books
17+
18+
?>

‎P00_CodeSamples/helloWorld_5.js‎

Whitespace-only changes.

‎P00_CodeSamples/package.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "Hello World with modules",
3+
"version": "0.0.1",
4+
"dependencies": {
5+
"colors":"0.5.0"
6+
}
7+
}

‎README.md‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
__ ______
2-
___ ___ ___/ /__ __ / / __/
3-
/ _ \/ _ \/ _ / -_)/ // /\ \
4-
/_//_/\___/\_,_/\__(_)___/___/
5-
6-
7-
8-
<h1>Curso introductorio a NodeJS | Noviembre 2013</h1>
1+
<h1>Curso introductorio a NodeJS</h1>
92

103
<ul>
114
<li>¿Javascript en el lado del servidor? Ideas y principios de Node.js</li>
@@ -23,3 +16,4 @@
2316
<ul>
2417

2518
BEEVA | www.beeva.com
19+
Noviembre 2013

0 commit comments

Comments
 (0)