Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
gfnork node.js workshop Lesson #1 JavaScript Ba...
Search
gfnork
November 29, 2014
Programming
990
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
gfnork node.js workshop Lesson #1 JavaScript Basics
syntax, operators, loops, conditionals, functions
gfnork
November 29, 2014
More Decks by gfnork
See All by gfnork
Basic Mobile Application Design
freundschaft
0
540
gfnork node.js workshop Lesson #2 JavaScript Async
freundschaft
0
1k
gfnork node.js workshop Lesson #3 node.js basics
freundschaft
0
480
gfnork node.js workshop Lesson #4 middleware for node
freundschaft
0
530
gfnork node.js workshop Lesson #5 node.js databases
freundschaft
0
480
gfnork node.js workshop Lesson #6 Unit testing
freundschaft
0
470
Other Decks in Programming
See All in Programming
Deep dive into the select statement (GopherCon UK)
jespino
0
180
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
cdk deploy JawsSonic #MARATHONしながらAWSリソースをデプロイしてみよう
akihisaikeda
2
120
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
220
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
270
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
190
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
340
ハーネス設計入門 〜プロンプト、コンテキストの次〜
kinopeee
56
38k
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
310
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
350
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Statistics for Hackers
jakevdp
799
230k
Visualization
eitanlees
152
17k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Making the Leap to Tech Lead
cromwellryan
135
10k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
930
Deep Space Network (abreviated)
tonyrice
0
300
Side Projects
sachag
456
43k
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