はてなブックマークアプリ

サクサク読めて、
アプリ限定の機能も多数!

アプリで開く

はてなブックマーク

  • はてなブックマークって?
  • アプリ・拡張の紹介
  • ユーザー登録
  • ログイン
  • Hatena

はてなブックマーク

トップへ戻る

  • 総合
    • 人気
    • 新着
    • IT
    • 最新ガジェット
    • 自然科学
    • 経済・金融
    • おもしろ
    • マンガ
    • ゲーム
    • はてなブログ(総合)
  • 一般
    • 人気
    • 新着
    • 社会ニュース
    • 地域
    • 国際
    • 天気
    • グルメ
    • 映画・音楽
    • スポーツ
    • はてな匿名ダイアリー
    • はてなブログ(一般)
  • 世の中
    • 人気
    • 新着
    • 新型コロナウイルス
    • 働き方
    • 生き方
    • 地域
    • 医療・ヘルス
    • 教育
    • はてな匿名ダイアリー
    • はてなブログ(世の中)
  • 政治と経済
    • 人気
    • 新着
    • 政治
    • 経済・金融
    • 企業
    • 仕事・就職
    • マーケット
    • 国際
    • はてなブログ(政治と経済)
  • 暮らし
    • 人気
    • 新着
    • カルチャー・ライフスタイル
    • ファッション
    • 運動・エクササイズ
    • 結婚・子育て
    • 住まい
    • グルメ
    • 相続
    • はてなブログ(暮らし)
    • 掃除・整理整頓
    • 雑貨
    • 買ってよかったもの
    • 旅行
    • アウトドア
    • 趣味
  • 学び
    • 人気
    • 新着
    • 人文科学
    • 社会科学
    • 自然科学
    • 語学
    • ビジネス・経営学
    • デザイン
    • 法律
    • 本・書評
    • 将棋・囲碁
    • はてなブログ(学び)
  • テクノロジー
    • 人気
    • 新着
    • IT
    • セキュリティ技術
    • はてなブログ(テクノロジー)
    • AI・機械学習
    • プログラミング
    • エンジニア
  • おもしろ
    • 人気
    • 新着
    • まとめ
    • ネタ
    • おもしろ
    • これはすごい
    • かわいい
    • 雑学
    • 癒やし
    • はてなブログ(おもしろ)
  • エンタメ
    • 人気
    • 新着
    • スポーツ
    • 映画
    • 音楽
    • アイドル
    • 芸能
    • お笑い
    • サッカー
    • 話題の動画
    • はてなブログ(エンタメ)
  • アニメとゲーム
    • 人気
    • 新着
    • マンガ
    • Webマンガ
    • ゲーム
    • 任天堂
    • PlayStation
    • アニメ
    • バーチャルYouTuber
    • オタクカルチャー
    • はてなブログ(アニメとゲーム)
    • はてなブログ(ゲーム)
  • おすすめ

    参議院選挙2025

『JavaScript, JavaScript...』

  • 人気
  • 新着
  • すべて
  • Function Declarations vs. Function Expressions

    8 users

    javascriptweblog.wordpress.com

    Lets start with a short quiz. What is alerted in each case?: Question 1: function foo(){ function bar() { return 3; } return bar(); function bar() { return 8; } } alert(foo()); Question 2: function foo(){ var bar = function() { return 3; }; return bar(); var bar = function() { return 8; }; } alert(foo()); Question 3: alert(foo()); function foo(){ var bar = function() { return 3; }; return bar(); v

    • テクノロジー
    • 2012/07/22 23:57
    • javascript
    • ES.next needs You! | JavaScript, JavaScript…

      3 users

      javascriptweblog.wordpress.com

      The next JavaScript specification is moving towards completion. TC39, the technical committee charged with creating ES.next (also known as ES Harmony, and sometimes ES 6) has already tentatively approved a number of proposals and there are a bunch more straw men awaiting approval. TC39 includes some of the finest minds in JavaScript (not least, Brendan Eich himself) but as Jeremy Ashkenas famously

      • 世の中
      • 2012/05/08 07:45
      • ECMAScript
      • JavaScript
      • programming
      • JavaScript Fat City

        19 users

        javascriptweblog.wordpress.com

        It’s official! We’re getting a new function syntax! The TC39 group (the panel charged with delivering ES 6) has reached consensus on an abbreviated syntax for JavaScript function expressions. Its popularly known as the fat arrow syntax, and is based on a similar construct found in CoffeeScript. Make no mistake, I’m delighted that we will finally have an alternative to the unnecessary clunkiness an

        • テクノロジー
        • 2012/04/10 08:04
        • javascript
        • ECMAScript
        • ECMAScript6
        • programming
        • Extending JavaScript Natives

          12 users

          javascriptweblog.wordpress.com

          Most built-in JavaScript types are constructors whose prototypes contain the methods and other properties that define their default behavior: //(results will vary by browser) Object.getOwnPropertyNames(Function.prototype) //["bind", "arguments", "toString", "length", "call", "name", "apply", "caller", "constructor"] You can’t delete or replace a native prototype, but you can edit the values of its

          • テクノロジー
          • 2011/12/06 00:06
          • javascript
          • es5
          • programming
          • まとめ
          • The Secret Life of JavaScript Primitives

            3 users

            javascriptweblog.wordpress.com

            You may not know it but, in JavaScript, whenever you interact with string, number or boolean primitives you enter a hidden world of object shadows and coercion. So dust off your Sherlock Holmes outfit and read on… The basics Objects are aggregations of properties. A property can reference an object or a primitive. Primitives are values, they have no properties. In JavaScript there are 5 primitive

            • テクノロジー
            • 2011/09/06 01:30
            • javascript
            • *あとで
            • Fixing the JavaScript typeof operator

              8 users

              javascriptweblog.wordpress.com

              What’s wrong with typeof? The most glaring issue is that typeof null returns “object”. It’s simply a mistake. There’s talk of fixing it in the next version of the ECMAScript specification, although this would undoubtedly introduce backwards compatibility issues. var a; typeof a; //"undefined" typeof b; //"undefined" alert(a); //undefined alert(b); //ReferenceError Other than that, typeof is just n

              • テクノロジー
              • 2011/08/08 23:06
              • javascript
              • typeof
              • *
              • Waldo: Search the JavaScript Object Model in under 1 KB

                8 users

                javascriptweblog.wordpress.com

                Here’s a tiny util that you can save as a bookmarklet and use to crawl the JavaScript object model of any web site. Waldo (thanks to @shinypb for the name!) lets you find and inspect instances by name, type or value, and it can be easily customized to add additional tests. It runs in the console on Chrome, Firefox, Safari and IE>8. It's sourced on github. Feel free to fork it if you want to add mo

                • テクノロジー
                • 2011/07/16 10:51
                • bookmarklet
                • javascript
                • Understanding JavaScript’s this keyword

                  4 users

                  javascriptweblog.wordpress.com

                  (In Portugese) The JavaScript this keyword is ubiquitous yet misconceptions abound. What you need to know Every execution context has an associated ThisBinding whose lifespan is equal to that of the execution context and whose value is constant. There are three types of execution context: global, function and evaluation. Here’s a tabular summary followed by a little more detail, and some examples:

                  • テクノロジー
                  • 2011/06/06 19:22
                  • javascript
                  • A fresh look at JavaScript Mixins

                    23 users

                    javascriptweblog.wordpress.com

                    (Russian, Japanese) In this article I’ll explore JavaScript mixins in detail, and introduce a less conventional, but to my mind more natural mixin strategy that I hope you’ll find useful. I’ll finish up with a profiler matrix summarizing the performance impact of each technique. [A big Thank You to the brilliant @kitcambridge for reviewing and improving the code on which this blog is based!] Re-us

                    • テクノロジー
                    • 2011/06/05 15:22
                    • javascript
                    • Mixin
                    • Design
                    • js
                    • tutorial
                    • 読み物
                    • JavaScript Strict Mode

                      8 users

                      javascriptweblog.wordpress.com

                      The fifth edition of the ECMAScript specification introduced Strict Mode. Strict Mode imposes a layer of constraint on JavaScript – intended to protect you from the more perilous aspects of the language. While researching this article I wrote 38 tests covering all the Strict Mode rules as defined in the ES5 specification. You can see how your favorite browser shapes up by clicking here. The code f

                      • テクノロジー
                      • 2011/05/03 18:53
                      • javascript
                      • あとで読む
                      • The JavaScript Comma Operator

                        8 users

                        javascriptweblog.wordpress.com

                        (на русском, 日本) Let’s begin with a funny tweet: The ‘c’ at the end is for the lowly comma operator. Last in the line of operator precedence and rarely documented, the comma operator hides its light under a bushel. It may not be a JavaScript heavy-hitter but I like it anyway. Its simple, elegant and you should make it your friend. So, here we go – more than you’ll ever need to know about JavaScrip

                        • テクノロジー
                        • 2011/04/04 18:28
                        • javascript
                        • js
                        • Truth, Equality and JavaScript

                          8 users

                          javascriptweblog.wordpress.com

                          You don’t have to be a JavaScript novice to get confused by this… if ([0]) { console.log([0] == true); //false console.log(!![0]); //true } or this… if ("potato") { console.log("potato" == false); //false console.log("potato" == true); //false } The good news is that there is a standard and all browsers follow it. Some authors will tell you to fear coercion and and code against it. I hope to persu

                          • テクノロジー
                          • 2011/02/07 19:17
                          • javascript
                          • Namespacing in JavaScript

                            9 users

                            javascriptweblog.wordpress.com

                            Global variables should be reserved for objects that have system-wide relevance and they should be named to avoid ambiguity and minimize the risk of naming collisions. In practice this means you should avoid creating global objects unless they are absolutely necessary. But, hey, you already knew all that….. So what do you do about it? Conventional wisdom tells us that the best global abatement str

                            • テクノロジー
                            • 2010/12/08 19:57
                            • JavaScript
                            • プログラミング
                            • あとで読む
                            • Extending Objects with JavaScript Getters

                              3 users

                              javascriptweblog.wordpress.com

                              Most browsers are coalescing around a consistent API for defining JavaScript Getters and Setters. I’m not entirely comfortable with custom getters and setters – JavaScript’s clean syntax is now a little murkier, and we have a new pitfall to avoid when iterating and cloning object properties, not to mention a significant risk of involuntary recursion – but still I’ll admit they have their uses. I’m

                              • テクノロジー
                              • 2010/11/24 22:28
                              • JavaScript
                              • Understanding JavaScript Closures

                                7 users

                                javascriptweblog.wordpress.com

                                In JavaScript, a closure is a function to which the variables of the surrounding context are bound by reference. function getMeAClosure() { var canYouSeeMe = "here I am"; return (function theClosure() { return {canYouSeeIt: canYouSeeMe ? "yes!": "no"}; }); } var closure = getMeAClosure(); closure().canYouSeeIt; //"yes!" Every JavaScript function forms a closure on creation. In a moment I’ll explai

                                • テクノロジー
                                • 2010/11/22 09:28
                                • closure
                                • javascript
                                • Rethinking JavaScript for-loops

                                  6 users

                                  javascriptweblog.wordpress.com

                                  (versión abreviada en español) If you think the introduction of Array.prototype.forEach and friends will send the for-loop the way of the dodo, think again. There’s life in the old dog yet. The for-loop is often seen as something of a one trick pony, most suited to the classic form of list iteration: for (var i=0; i<arr.length; i++) { //do something to each member } but with the wealth of higher o

                                  • テクノロジー
                                  • 2010/10/12 11:32
                                  • JavaScript
                                  • あとで読む
                                  • Understanding JavaScript Prototypes.

                                    10 users

                                    javascriptweblog.wordpress.com

                                    (en Español, русском, 中文) JavaScript’s prototype object generates confusion wherever it goes. Seasoned JavaScript professionals, even authors frequently exhibit a limited understanding of the concept. I believe a lot of the trouble stems from our earliest encounters with prototypes, which almost always relate to new, constructor and the very misleading prototype property attached to functions. In

                                    • テクノロジー
                                    • 2010/06/27 09:24
                                    • javascript
                                    • prototype
                                    • tips
                                    • JavaScript, JavaScript...

                                      6 users

                                      javascriptweblog.wordpress.com

                                      Behold, the new hotness! The shapely Arrow Function has driven away the irksome function keyword and (by virtue of lexical this scoping) bought joy to many a JavaScript programmer. Yet, as the following account relates, even the best tools should be used with discretion. Continue reading “Of Classes and Arrow Functions (a cautionary tale)” → I wrote a book called If Hemingway Wrote JavaScript in w

                                      • テクノロジー
                                      • 2010/06/10 02:28
                                      • javascript
                                      • 勉強
                                      • development
                                      • programming
                                      • *あとで
                                      • express yourself: rapid function definition

                                        3 users

                                        javascriptweblog.wordpress.com

                                        The native JavaScript function indexOf, applied to a String, returns the index of the first occurrence of a specified value. Useful as it is, I often find myself wishing for a variant method that will return the index after the occurrence so that I can pass the result to a slice call and return everything after a given character. With this in mind, I created a method called express (as in expressi

                                        • テクノロジー
                                        • 2010/05/24 07:54
                                        • javascript

                                        このページはまだ
                                        ブックマークされていません

                                        このページを最初にブックマークしてみませんか?

                                        『JavaScript, JavaScript...』の新着エントリーを見る

                                        キーボードショートカット一覧

                                        j次のブックマーク

                                        k前のブックマーク

                                        lあとで読む

                                        eコメント一覧を開く

                                        oページを開く

                                        はてなブックマーク

                                        • 総合
                                        • 一般
                                        • 世の中
                                        • 政治と経済
                                        • 暮らし
                                        • 学び
                                        • テクノロジー
                                        • エンタメ
                                        • アニメとゲーム
                                        • おもしろ
                                        • アプリ・拡張機能
                                        • 開発ブログ
                                        • ヘルプ
                                        • お問い合わせ
                                        • ガイドライン
                                        • 利用規約
                                        • プライバシーポリシー
                                        • 利用者情報の外部送信について
                                        • ガイドライン
                                        • 利用規約
                                        • プライバシーポリシー
                                        • 利用者情報の外部送信について

                                        公式Twitter

                                        • 公式アカウント
                                        • ホットエントリー

                                        はてなのサービス

                                        • はてなブログ
                                        • はてなブログPro
                                        • 人力検索はてな
                                        • はてなブログ タグ
                                        • はてなニュース
                                        • ソレドコ
                                        • App Storeからダウンロード
                                        • Google Playで手に入れよう
                                        Copyright © 2005-2025 Hatena. All Rights Reserved.
                                        設定を変更しましたx