Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
gfnork node.js workshop Lesson #1 JavaScript Ba...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
gfnork
November 29, 2014
Programming
0
970
gfnork node.js workshop Lesson #1 JavaScript Basics
syntax, operators, loops, conditionals, functions
gfnork
November 29, 2014
Tweet
Share
More Decks by gfnork
See All by gfnork
Basic Mobile Application Design
freundschaft
0
520
gfnork node.js workshop Lesson #2 JavaScript Async
freundschaft
0
970
gfnork node.js workshop Lesson #3 node.js basics
freundschaft
0
470
gfnork node.js workshop Lesson #4 middleware for node
freundschaft
0
520
gfnork node.js workshop Lesson #5 node.js databases
freundschaft
0
480
gfnork node.js workshop Lesson #6 Unit testing
freundschaft
0
460
Other Decks in Programming
See All in Programming
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
520
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
290
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
160
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
610
条件判定に名前、つけてますか? #phperkaigi #c
77web
1
130
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
150
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
160
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
130
Ruby and LLM Ecosystem 2nd
koic
1
980
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
1
440
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
390
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.5k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
110
Designing for Timeless Needs
cassininazir
0
170
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
53k
Designing Experiences People Love
moore
143
24k
New Earth Scene 8
popppiees
1
1.7k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
120
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
Git: the NoSQL Database
bkeepers
PRO
432
66k
KATA
mclloyd
PRO
35
15k
Transcript
None
2
3 var iable = 'hello world'; iable = 5; global_var
= 'hello world'; let knowledge = ''; 47 + 11; '47' + '11'; 47 + '11'; 47 + Number('11');
4 var
5
6 4 * 10 + 2; 4 * (10 +
2); var i = 3; iable += i++; iable = ++i;
7
8 var tru = 1, fals = 0, wtf =
2; tru || fals; wtf || fals; wtf || tru; tru || wtf; var tru = 1, fals = 0, wtf = 2; tru && fals; wtf && fals; wtf && tru; tru && wtf;
9 true false
10 'any string'; []; { }; 1; ''; NaN; null;
undefined;
11 var one = 1, two = 2, two_in_words =
'2'; one == two; one != two; two == two_in_words; two === two_in_words; two < one; two >= two_in_words;
12
13 if (one) console.log('hello noob!') else console.log('wtf'); console.log(true ? 'hello
noob!' : 'wtf'); var mind_twist = 'happens' && 'is annoying' ? 'with strange statements' && 'is real terror' : 'even if your skill' > 9000 || 'you work alone'; mind_twist == "is real terror" ? console.log("hello pro!") : 'wtf';
14 if else if else if else
15 switch (something) { case 'really interesting': alert('wow this case
is really interesting!'); break; case 42: alert('ok makes sense'); break; default: alert('no specific case was evaluated -> default'); break; }
16 for(var i = 0; i <= 9000; i++) console.log('power
level ' + i ); var go_on = true; while( go_on ) if( Math.random()*6 >= 5 ) go_on = false; do { // interesting thing still_interesting ? continue : break; } while ( i++ < 100 );
17 for while do do while
18 var Story = ['this', 'is', 'a story', 'all about',
'how my code', 'got', 'flipped turned upside down']; Story[2] + Story[5] + Story[6]; var Story2 = []; Story2.push(Story[0], Story[1], Story[4], Story[5], Story[2]); console.log(Story2 = Story2.join(' ')); console.log(Story2.split(' ')); Story2.length;
19 split join
20 var myObject = { sayHello : function() { console.log('hello');
}, myName : ‘gfnork' }; myObject.sayHello(); console.log(myObject.myName);
21
22 myObject.sayName = function () { console.log('my name is: '
+ this.myName); }; myObject.sayName(); var testObj = { sayName: myObject.sayName }; testObj.sayName();
23 this this this this this this
24 var TalkTo = function(person, msg) { var text =
msg + ', ' + person; console.log(text); }; TalkTo('Gfnork', 'What’s up'); var TextTo = function(person, msg) { return = msg + ', ' + person; };
25 var insult = function () { console.log('idiot!') }; var
praise = function () { console.log('good boy!') }; var teacher = function () { if (Math.random() < 0.5) return insult(); else return praise(); }; teacher(); teacher();
26
27 (function () { console.log('This output will be printed once!');
})(); var teacher = function () { var reaction = Math.random() < 0.5 ? function () { console.log('idiot!') }() : function () { console.log('good boy!') }(); return reaction; };
28
29
30