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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
gfnork
November 29, 2014
Programming
0
960
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
510
gfnork node.js workshop Lesson #2 JavaScript Async
freundschaft
0
960
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
470
gfnork node.js workshop Lesson #6 Unit testing
freundschaft
0
460
Other Decks in Programming
See All in Programming
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
ぼくの開発環境2026
yuzneri
0
220
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
並行開発のためのコードレビュー
miyukiw
0
150
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Into the Great Unknown - MozCon
thekraken
40
2.3k
Marketing to machines
jonoalderson
1
4.6k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
86
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Documentation Writing (for coders)
carmenintech
77
5.3k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
260
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
WCS-LA-2024
lcolladotor
0
450
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