javascript setTimeout()
js: html:
js: html:
В 1965 году Джеймс Роджерс был приговорен к казни за так называемый “массачусетский эксперимент”, однако за два дня до казни будучи в камере он покончил с собой, отравившись цианидом калия, ампулу которого принес ему кто-то из его пациентов. Недавно “Массачусетский университет психологии и невропаталогии”, в котором работал доктор Роджерс, официально заявил, что этот эксперимент имеет ... Read more
Protection from login, register and reset-password brute-force attacks. Why humans should prove that they are humans by filling captchas? Lets bots prove that they are not bots with adding javascript to their user-agents! Important: delete username 'admin' if you have it on your site. More than 90% of brute-force attacks try to crack the 'admin' ... Read more
DOM access is expensive; it’s the most common bottleneck when it comes to JavaScript performance. The bottom line is that DOM access should be reduced to minimum. This means: Avoiding DOM access in loops Assigning DOM references to local variables and working with the locals Using selectors API where available Caching the length when iterating ... Read more
The main difference is that apply() lets you invoke the function with arguments as an array; call() requires the parameters be listed explicitly.
Intro JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes and subtle bugs, as well as performance issues and bad practices, that non-expert JavaScript programmers may encounter on their endeavors into the depths of the language. JavaScript Garden does ... Read more
Given an integer n, write a function to return an array of size n, containing each of the numbers from 0 to n-1 in a random order. The numbers should not repeat and each number must be in array only once. Example: if n = 3, one possible array returned would be [2, 0, 1]. ... Read more
Given an array of unknown size and containing only integers between 0 to 30 (inclusive), write an algorithm to find which numbers are duplicated, if any.
Adding a prototyped method to a function Adding a prototyped method to all string objects Adding a prototyped method to all array objects Adding a prototyped method to a function Properties added in the constructor (or later) override prototyped properties Prototyped properties affect all objects of the same constructor, simultaneously, even if they already exist ... Read more
Songs: 00:00 - Climb up on my Music 04:54 - A most disgusting Song 09:43 - I think of You 13:08 - Heikki's suburbia bus tour 16:32 - Silver words? 18:36 - Sandrevan lullaby - Lifestyles 25:13 - To whom it may concern 28:35 - It started out so nice 32:36 - Halfway up the ... Read more