For testing, the code should be selected and copied directly from tweets . - approx. trans.

I recently found this tweet from <a rel="nofollow" href="https://twitter.com/FakeUnicode/"> @FakeUnicode < / a>. There was a JavaScript snippet that looked pretty innocuous, but displayed a hidden message. It took me some time to understand what was going on. I think that the record of the steps of my investigation may be of some interest to someone.

Here is the snippet:


What would you expect from him?

Here we use the for in loop, which passes through the enumerable properties of the object. Since only the property A is specified, we can assume that the message with the letter A will be shown. Well ... I was wrong. : D
KlauS 23 september 2017, 8:40


I love different experiments with JavaScript. They allow us to look in the future and see how exciting it will be. When you will be viewing this collection, probably you will think of the recent king Adobe Flash, and then you realize how fast CSS and JavaScript took the throne away from it. Modern browsers allow us to use a variety of different effects and animations without any limitations. However, the word "experimental" means a number of limitations, such as the incorrect displaying in some browsers (IE), in addition, these plugins will be as conceptual addition to the personal pages, and not for use in the large projects.
BumBum 19 december 2012, 19:37

Sometimes, web developers get a task that requires a smooth movement of the object on the screen. This may be a download string, sprite, or something else. The problem occurs when the shift seems to be too abrupt even at one point, and that messes up the overall impression of the event. How do we avoid it? Should we use anti-aliasing techniques?

This can be done using the sprites, as well as smart reduction of the original image. Here are some steps that you need to follow:

First, we have a large image of a car.
BumBum 4 october 2012, 19:32

HTTP Archive statistics shoes the explosive growth of JavaScript in the Web. A year ago, the average size of scripts was 128 KB per the page, and now it is 189 KB.


On the one hand, it is great that this programming language is going through a sort of rebirth and the universal popularity. On the other hand, the expansion of scripts size loads up the browser and has a negative effect on the loading time of pages. It is very sad that to download one tweet (140 symbols) requires 1.65 MB of scripts.
BumBum 23 may 2012, 14:12

I read an article about Kerning.js, which is a small JavaScript library that even can be the utility to implement the marvelous typography on the web pages. Then I remembered that I had used something like Lettering.js library lately.

I am not going to give the detailed instruction on its use (I will give some links to this instruction and every developer will figure it out), as well I will add some information about two other small libraries, l have used their functional in my projects.

Lettering.js is an assistant for radical web typography, Cryptico.js is an assistant for encrypting text and Rasta.js is anonymous domain-less key-value store for frontend JavaScript. Here are the links to the developers’ websites of these libraries and instructions for their use.

Lettering.js is on Githab

Lettering.js allows breaking the words into letters, sentences into the words and the paragraphs into the lines, as well it arranges the broken fragments in an interesting way using css. The examples are on the website letteringjs.com.
Sparks 20 december 2011, 17:31

Do you know what value produce this code in JavaScript?

var foo = 1;
function bar() {
if (! foo) {
var foo = 10;

If you are surprised what will produce "10", then the following code confuse you at all:

var a = 1;
function b () {
a = 10;
function a() {}

In this case, the browser produces "1". So what exactly is going on? Although this behavior seems strange, dangerous and confusing, in fact it is very powerful and significant tool JavaScript. There is a name for term for such behavior, which is “hoisting”. This article will try to explain the mechanism of the language, but first let us talk about scope in JavaScript.
Sparks 30 october 2011, 17:14

JavaScript library (stream.js) introduces a "new" numerical data structure: streams. This container is similar to an array and a linked list, but it contains an unlimited number of elements that are realized by a lazy evaluation.

var s = Stream.range (10, 20);
s.print (); // prints the numbers from 10 to 20

You can specify only the beginning of the range Stream.range (low) for an argument Stream.range (low, high), then the stream will consist of an unlimited natural numbers. Stream.range () starts with 1 by a default.

The idea of supposedly "infinite" range simplifies the programming. For example, in this way, a list of odd and even numbers is produced.
BumBum 29 october 2011, 19:32