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
社内LT2019/10/24
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kento Matsumoto
October 24, 2019
Programming
81
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
社内LT2019/10/24
Kento Matsumoto
October 24, 2019
More Decks by Kento Matsumoto
See All by Kento Matsumoto
ストーリーポイント.pdf
stepanve
0
110
社内LT2020/01/23
stepanve
0
60
社内LT2019/11/21
stepanve
0
70
社内LT2019/11/7
stepanve
0
93
Other Decks in Programming
See All in Programming
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.4k
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.2k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
270
setup-vp GitLab対応の裏側
naokihaba
0
150
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
6k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
33
14k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
310
iOSDCのペンライトを自動制御したい!
akkeylab
0
340
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
300
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
470
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
330
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
370
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1.5k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
Raft: Consensus for Rubyists
vanstee
142
7.7k
ラッコキーワード サービス紹介資料
rakko
1
5.1M
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
The Cult of Friendly URLs
andyhume
79
7k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
720
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
930
We Have a Design System, Now What?
morganepeng
55
8.3k
Transcript
JavaScriptのデータ型 社内勉強会:2019/10/24
データ型 プリミティブ型 - 値型 - ラッパーオブジェクトが用意されている (Number, String, Boolean) ex)
数値・文字列・論理値・ null・undefined オブジェクト型 - 参照型 - プロパティを持っている ex) function, object .etc let a = 'a' let b = a // a=’a’ b=’a’ b = 'b' // a=’a’ b=’b’ let objA = new Object() let objB = objA // a={} b={} objB.b = 'b' // a={b:’b’} b={b:’b’}
ラッパーオブジェクトの挙動 let a = 'a' // ラッパーオブジェクトの例 a.length // 1
プリミティブ型をあたかもオブジェクトのように扱える let a = 'a' b = new String(a) b.length // 1 b = null // プロパティやメソッドが呼ばれる度にラッパーオブジェクト作成 let a = 'a' a.a = a a.a // undefined
オブジェクトを固くしたい時 (freeze, seal, extensions) プロパティの追加 プロパティの削除 プロパティの値変更 extensions ✖ ⭕
⭕ seal ✖ ✖ ⭕ freeze ✖ ✖ ✖ ‘use strict’で使用するとエラーで落ちます!!
オブジェクトを固くしたい時 (freeze, seal, extensions) let objA = {a: 1} let
objB = {b: 1} let objC = {c: 1} Object.freeze(objA) Object.seal(objB) Object.preventExtensions(objC) Object.isFrozen(objA) // true Object.isFrozen(objB) // false Object.isFrozen(objC) // false let objA = {} let objB = {} let objC = {} Object.freeze(objA) Object.seal(objB) Object.preventExtensions(objC) Object.isFrozen(objA) // true Object.isFrozen(objB) // true Object.isFrozen(objC) // true
nullの不思議 let a = undefined a // undefined typeof a
// undefined nullはオブジェクトである(歴史的経緯から) let a = null a // null typeof null // object