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
【Japanese】readable code part.1
Search
readalpha
September 16, 2020
Programming
47
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
【Japanese】readable code part.1
readalpha
September 16, 2020
More Decks by readalpha
See All by readalpha
【Japanese】What is "this" in JavaScript.
readalpha
0
38
Other Decks in Programming
See All in Programming
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
750
カツオ、ご期待ください
suneo3476
0
190
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
Next.js: The final boss of Web Performance
guaca
0
260
気持ちぃ〜角丸 Squircle
ryu1013
0
310
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
500
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
430
Workers Cache を知る
syumai
0
360
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.2k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Are puppies a ranking factor?
jonoalderson
2
4.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Building AI with AI
inesmontani
PRO
1
1.3k
Marketing to machines
jonoalderson
1
5.9k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
530
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Transcript
ಡΈ͍͢ίʔυͱ Ϧʔμϒϧίʔυ͔ΒֶͿίʔυͷॻ͖ํQBSU
Ͳͬͪͷํ͕ಡΈ͍͢ʁ /** * αΠίϩͷ͕6͔ͦΕҎ֎͔Λग़ྗ͢ΔϓϩάϥϜ * ࡾ߲ԋࢉࢠύλʔϯ */ const return6orNo =
function () { const RollTheDice =Math.floor(Math.random() * 6 + 1); let result = RollTheDice === 6 ? 'yes' : 'No'; return result; } console.log(return6orNo()); /** * ී௨ͷifจύλʔϯ */ const return6orNo = function () { const RollTheDice =Math.floor(Math.random() * 6 + 1); if (RollTheDice === 6) { return 'yes'; } else { return 'No'; } } console.log(return6orNo());
lίʔυଞͷਓ͕ ࠷࣌ؒͰཧղͰ͖ΔΑ͏ʹॻ͔Ͷ͍͚ͳ͍z 伴ͱͳΔߟ͑
໊લʹใΛ٧ΊࠐΉ w ໊લ͚ͩͰͦΕ͕ԿΛ͢Δͷ͔அͰ͖Δˠ w ໌֬ͳ୯ޠΛબͿʢಈ࡞ΛࢭΊΔɿTUPQ ˠQBVTF ։͍͍ͯΔϖʔδͷ63- Λऔಘ͢ΔɿHFU63- ˠHFU$VSSFOU1BHF63- ʣ
w ൚༻తͳ໊લΛආ͚Δɺ͘͠͏ঢ়گΛબͿʢ߹ܭֹ͕ۚ ΓͷؔͳΒɺSFUVSOSFUVSO7BMˠSFUVSOUPUBM"NPVOUʣ w ໊લͷ͞ΛܾΊΔʢ໊લ͍ํ͕͍͍͕ɺ͍͜ͱѱ͍͜ͱͰͳ͍ɻε ίʔϓ͕খ͚͞Ε໊͍લΛͬͯΑ͍ɻάϩʔόϧมͰ͋Ε͔ͬ͠Γ໊ͨ͠લʹ ͢Δɻʣ
ίϝϯτ͖͢͜ͱ w ໋໊Ͱ࣮ଶ͕Θ͔ΔͳΒɺίϝϯτඞཁͳ͍ɻ //ݱࡏͷϖʔδͷURLΛऔಘ͢Δ getCurrentPageURL();
ίϝϯτ͖͢͜ͱ w ໋໊ͷࠅ͞ΛίϝϯτͰิΘͳ͍ɻ /** * ཁૉAͱཁૉBͷߴ͞Λ߹ΘͤͨͷΛग़ྗ͢Δɻ */ function calculationHeight() {
ίϝϯτ͖͢͜ͱ w ༷Λॻ͘ɻͲͷΑ͏ͳ͕݅ἧ͑ͷͳ͍ಈ࡞Λ ͢Δͷ͔ͳͲ /** * λϒΓସ͑༻ͷؔ * ཁૉʹ.js-tabsΫϥεΛ༩͢Εɺ *
ͦͷԼͷཁૉશͯλϒػೳΛ࣋ͭɻ */ function tabFunc() {
ίϝϯτ͖͢͜ͱ w ઃܭͷϩδοΫΛॻ͘ɻಡऀʹϩʔυϚοϓΛෑ͚ΔͷͰɺ هड़ͷྲྀΕΛѲ͢Δͷָ͕͍͢͝ʹͳΔɻ /** * Γସ͍͑ͨը૾ΛpositionͰશͯॏͶɺ * ࣌ؒܦաͰͦΕͧΕͷz-indexΛͣΒ͍ͯ͘͠ɻ *
[3,2,1,0]→[0,3,2,1]→[1,,3,2,0]ͱ͍͏ײ͡ɻ * Γସ͑ͱಉ࣌ʹjQueryͷfadeIn()Λ͍ͬͯΔɻ */ function switchImages() {
ίϝϯτ͖͢͜ͱ w ίʔυͷܽؕʹίϝϯτΛ͚ͭΔɻ /** * ͜ͷؔquerySelectorAllΛ͍·ͬͯ͘ΔͷͰॲཧ͕͍ɻ * ͬͱແବͷͳ͍ཁૉऔಘΛ͢ΔΑ͏ʹϦϑΝΫλϦϯά͖͢ɻ * ෳՕॴͷઃஔඇରԠ
*/ function tabFunc() {