Analyze your JSON string as you type with an online Javascript parser, featuring tree view and syntax highlighting. Processing is done locally: no data send to server.
Analyze your JSON string as you type with an online Javascript parser, featuring tree view and syntax highlighting. Processing is done locally: no data send to server.
javascript の暗黒面については、ちょっと書かれているので何も言わずもがな。なのですが、最近こういった質問が増えてきたので少し書く。 via - JavaScript の暗黒面を覗く nullはオブジェクトだ! nullは歴史的理由からobjectです。なので、typeofするとobjectって返ってきます。 alert(typeof null); // object なので、この事に気がついている方は次のようなコードを書きます。 if(typeof hoge == 'undefined' || hoge == null){ // do something } たとえば、次のようなコード var hoge = function (a){ if(typeof a == 'number'){ // was number // 数値計算とか return a + 1; } if(type
前回のエントリが700users突入しました。ありがとうございます。参考になれば幸いです。 ということで、その2になります。 前回書いた通り、C/Javaについてはある程度の知識がある人なので、クラスなどのオブジェクト指向はちゃんと理解されているようですが、プロトタイプ指向は初めて学ぶようです。 javascript(ECMAScript)のプロトタイプは他のプロトタイプ指向言語とはひと味違う動作をするので、その点も含めておさらい プロトタイプとはなんですか?プロトタイプとは継承パターンの一つでしかないです プロトタイプは単なる継承パターンであり、単一の方向への継承しか行わない点についてはクラスベースと同じです。 var Hoge = function (){}; Hoge.prototype.methodA = function (){ return "this is methodA
javascriptのprototypeはなかなか理解してもらえないですねぇ。 ここ1年間でマジマジと実感しました。 特に、大規模開発をしているとこだと、いろんな知識が入り乱れていて(ホームページ時代からAjax本を読んだ人とか)が、javascriptが単なる関数型列挙な言語(語弊があるけど)という見方が大多数を占めているように見えます。 そんな中で "String.prototype.trim" みたいなコードを見せても、説明下手なのか中々上手く伝わらないですねぇ。 ということで(?)、僕がjavascriptのprototypeを身に着けるまでやったこと、とか。これも備忘 prototype.jsのソースコードを眺める Array.mapとかEnumerable, Hashは勉強になりますねー。 ただ、prototype継承されすぎて、ちょっと多すぎなこともあります。 var
Access all 834 Vim commands in our ultimate Vim cheat sheet. From basic text editing to advanced mode commands, cursor movements, and file operations – all organized by type. List of All Vim Commands Basic Vim Commands Let’s start with an easy set of Vim commands to open, save, and exit Vim. :e filename Open […]
JavaScript(found at Code Snippets: Capitalize) function capitalize(str){ return str.replace(/\w+/g, function(word){ return word.charAt(0).toUpperCase() + word.substr(1).toLowerCase(); }); } ok(capitalize("aBC dEf GHI") == "Abc Def Ghi"); replaceの第2引数に、関数を入れられることを学んだ。『JavaScriptビジュアル・リファレンス (Web Designer’s Handbook Series)』(これについては書きたいことがありますよ)でも、『JavaScript』でも触れられていなかった。追記ECMA-262 3rd Edition - 1
あなたにとって重要なトピックや同僚の最新情報を入手しましょう最新の洞察とトレンドに関する最新情報を即座に受け取りましょう。 継続的な学習のために、無料のリソースに手軽にアクセスしましょうミニブック、トランスクリプト付き動画、およびトレーニング教材。 記事を保存して、いつでも読むことができます記事をブックマークして、準備ができたらいつでも読めます。
Published: Wed, 28 Jan 2009 12:04:53 GMT Updated: Sat, 22 Mar 2025 15:38:12 GMT Read time: ⏱️ < 1 min read Andrea Giammarchi had a interesting article which stated you can detect IE in 32 bytes of code. I wondered if this could be improved, after a few failed attempts I found this to be the smallest and fastest way:- <pre lang="javascript"> IE='\v'=='v' </pre> Pretty cool eh?
It is with much happiness that I think I can finally say, without seeming like a fool, that: “JavaScript Getters and Setters are now prevalent enough to become of actual interest to JavaScript developers.” Wow, I’ve been waiting a long time to be able to say that. I want to start by giving a whirlwind tour of Getters and Setters and why they’re useful. Followed by a look into what platforms now su
JavaScipt libraries have made huge leaps and bounds in helping developers write code and develop products more quickly. jQuery is one of the most popular JavaScript frameworks, with powerful tools that improve the user’s interaction with Web applications. jQuery has an additional advantage in that it allows developers to select elements on a page using CSS-like syntax. To help you take it up a not
追記:最速インターフェース研究会 :: Firefoxでの開発を高速化する自動リロードスクリプトで既出でした。 デモを 2008-11-03_1209 - javascripter's library に置いた。 ライブラリ本体は javascripter's gist: 21788 — Gist にある。 (function () { var last = null; (function request() { with (new XMLHttpRequest()) { open('get', location.href, true); send(null); onload = function () { if (!last || last == this.responseText) { last = this.responseText; setTimeout(request, 500)
YUI Doc is a Python application used at build time to generate API documentation for JavaScript code. YUI Doc is comment-driven and supports a wide range of JavaScript coding styles. The output of YUI Doc is API documentation formatted as a set of HTML pages including information about methods, properties, custom events and inheritance for JavaScript objects. YUI Doc was written for the YUI Projec
Creating a table with dynamically highlighted columns like Crazy Egg's pricing table Update Aug 29, 2007: Examples 9 and 10, and the downloadable zip now accommodate for JavaScript-disabled browsers. Update Aug 28, 2007: links to examples fixed. Again. I like Crazy Egg's pricing table on their Pricing & Signup page. When you click on "Sign Up" for an option, that plan's column highlights, the othe
Understand the customer journey with Snapshots, Heatmaps and Recordings Use our visual reports and individual session recordings to get to know your website visitors – where they're coming from, where they're navigating to, and where they're getting stuck – so you can make design changes with confidence. Start by analyzing your website Get direct feedback from your customers and website visitors I
dTree is a free JavaScript tree menu. There are a lot of tree generating scripts just like this one, and many of them are great. So why use dTree? dTree is very simple to set up and use. You don't have to worry about adding pages to the tree in a specific order, which makes it ideal for generating a tree from a database. The first version of the tree is still available here. Unlimited number of le
僕にも教える人ができた(? というか人にモノを教える立場)になったので、とりあえず、最近はもっぱらjavascriptを教えています。 もともとCやJavaなどについてはある程度の知識がある人なので、それを少しjs的な意味で、関数言語的な教えをやっている最中のメモ 変数って何ですか?変数って値もしくは式そのものに利便的な名前をつけているものです 次のhogeとfooは値をいれる箱ではなく、値そのものに別名(もしくは分かりやすい名称)を割り当てているだけに過ぎませんよ。 var hoge = 1; var foo = [1, 2, 3]; alert(hoge + 1); // 2 alert(foo[0]); // 1 alert(1 + 1); // 2 alert([1, 2, 3][0]); // 1 つまり、関数自体を変数に代入する事ができます。(functionとは特別な呼び名
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く