Using continue with a label Summary Terminates execution of the statements in the current iteration of the current or labelled loop, and continues execution of the loop with the next iteration. Version Information Syntax continue [ label ]; Parameters label Identifier associated with the label of the statement. Description In contrast to the break statement, continue does not terminate the execution of the loop entirely: instead, In a while loop, it jumps back to the condition. The continue statement can include an optional label that allows the program to jump to the next iteration of a labelled loop statement instead of the current loop. Examples Example: Using continue with while The following example shows a while loop that has a continue statement that executes when the value of i is 3. i = 0; n = 0;while (i < 5) { i++; if (i === 3) { continue; } n += i;} Example: Using continue with a label In the following example, a statement labeled checkiandj contains a statement labeled checkj. See also break, label
HTML5 introduces built-in media support via the <audio> and <video> elements, offering the ability to easily embed media into HTML documents. Embedding media in your HTML document is trivial: <video src=" controls> Your browser does not support the <code>video</code> element. </video> This example plays a sample video, with playback controls, from the Theora web site. Here is an example for embedding audio into your HTML document <audio src="/test/audio.ogg"><p>Your browser does not support the <code>audio</code> element. The src attribute can be a URL of the audio file or the path to the file on the local system. <audio src="audio.ogg" controls autoplay loop><p>Your browser does not support the <code>audio</code> element </p></audio> This code example uses attributes of the <audio> element: The preload attribute is used in the audio element for buffering large files. This plays the Ogg video file in browsers supporting the Ogg format. Using Flash
SEO Beyond Your Site The most common initial SEO strategy is to follow best practices for building user-friendly, well-formed websites. Optimizing your content and HTML, using good web page titles and generating links to your website are all ways you can help search engines such as Google, Yahoo! and Bing index your site better and more accurately. However, because of an updated Google search ranking algorithm (dubbed "Panda") — which aims to reduce the efficacy of content farms with shallow content that often have artificially inflated backlinks and black hat search engine optimized content — the status quo has drastically shifted. Google, along with other search engines, has gotten smarter and now includes social signals as a top ranking factor. In order to succeed in this new search engine landscape, we must therefore look beyond our own website. In this article, I’ll share some tips for using social media to help with SEO. The New Era of SEO Virality Social Media Presence How to Optimize Beyond Your Site
label The labeled statement can be used with break or continue statements. It is prefixing a statement with an identifier which you can refer to. Syntax label : statement label Any JavaScript identifier that is not a reserved word. statement Statements. break can be used with any labeled statement, and continue can be used with looping labeled statements. Description You can use a label to identify a loop, and then use the break or continue statements to indicate whether a program should interrupt the loop or continue its execution. Note that JavaScript has NO goto statement, you can only use labels with break or continue. Examples Using a labeled continue with for loops Using a labeled continue statement Given an array of items and an array of tests, this example counts the number of items that passes all the tests. var itemsPassed = 0;var i, j; top:for (i = 0; i < items.length; i++){ for (j = 0; j < tests.length; j++) if (! Using a labeled break with for loops Using a labeled break statement Specifications
Hello Backbone.js Tutorial Shameless advertisement: Don't forget to check out Agility.js, a simpler alternative to Backbone.js. Hello Backbone is a simple Backbone.js tutorial comprised of self-explanatory "hello world" examples of increasing complexity. It was designed to provide a smoother transition from zero to the popular Todos example. Backbone.js offers a lean MVC framework for organizing your Javascript application. It leads to more maintainable code by untangling the "spaghetti" of callbacks tied to different parts of the DOM and the backend server that often arises in rich client-side applications. The tutorial starts with a minimalist View object, and progressively introduces event binding/handling, Models, and Collections. Start the tutorial Once in the tutorial, use the navigation menu in the top-right corner to view other examples. Copyright © Artur Adib [ arturadib.com ]
jshashtable - JavaScript hash table A standalone implementation of hash table in JavaScript. It associates keys with values, and allows any object to be used as the key (unlike JavaScript's built-in Object, which only allows strings as property names). Also included is a hash set implementation, implemented by wrapping the keys of a hash table. jshashtable requires no libraries and is designed to work in all ECMAScript 3 compliant environments, including all major browsers and Node.js. In particular, it has been tested and works in: Firefox (all versions, back to Phoenix 0.1) Internet Explorer 5.5+ Safari 3+ (untested in previous versions) Google Chrome (all versions) Opera 7+ See the jshashtable website for full documentation. Version 3.0 is released today (16th July 2013).
traceur-compiler - Google's vehicle for Javascript Language Design Experimentation Javascript Mistakes You Must Avoid If you are new to JavaScript and you write raw JavaScript or use any framework (jQuery, Mootools, Dojo, YUI) with it, you must avoid few mistakes. Actually these are my experiences when I was learning JavaScript. Equality Operator You may know that in js, two operators are used for comparing values. First is == (two equal signs). This operator compare the values but it doesn’t compare the data type of operands. Here are more examples. Some of the results are unexpected specially for those who don’t know how JavaScript evaluates == operator. Consider the first example (1 == “1″). In the second example (“true” == true) is false because if the string contain characters other than digits, convertion to number will return NaN which means Not a Number. You can check what value will be returned after conversion to number using the Number constructor. Now you maybe wondering how === operator works. Not Assigning null to Reference Types Reference Variable Initialization Don’t Forget Keyword var
Search Features In addition to providing easy access to billions of web pages, Google has many special features to help you to find exactly what you’re looking for. Some of our most popular features are listed below. Everyday Essentials Weather To see the weather for many U.S. and worldwide cities, type “weather” followed by the city and state, U.S. zip code, or city and country. Stock Quotes To see current market data for a given company or fund, type the ticker symbol into the search box. Back to top Reference Tools Calculator To use Google’s built-in calculator function, simply enter the calculation you’d like done into the search box. Choosing Keywords Synonym Search If you want to search not only for your search term but also for its synonyms, place the tilde sign (~) immediately in front of your search term. Local Search Health Search Trip Planning Query Refinements Search by Number