Javascript collection

Javascript
sorry for noobie question. Can you explain please, what is the difference between: 1. var a = []; a['b'] = 1; 2. var a = {}; a['b'] = 1; I c...
2 years ago

Error javascript

jQuery
In console, I have this error. I use the latest jquery 3.1. How to rectify this element ? Thank you typeError: window.on is not a function <scr...
2 years ago

Javascript Regex

Javascript
Whats the difference between using [] and () in this situation? var str = "Hel?lo the?re , Woul?d you like some ice?cream?"; var rExp = /[?+]/ig...
2 years ago

JavaScript filterRGB

Java
I'm currently in the process of converting Java to JavaScript and need to change the colour of some images. Right now each image is loaded within an ...
2 years ago

javascript pass

Javascript
Is there something along the lines of python 'pass' in javascript? I want to do the javascript equivalent of: try: # Something that throws excepti...
2 years ago

Learning javascript

Javascript
Currently, I am using Javascript - The Definitive Guide for learning Javascript from scratch. Having learnt Java, PERL and other programming languages...
2 years ago

Javascript - setInterval()

Javascript
I am making a game using Javascript, and to update the game I am using setInterval(). Should I use clearInterval() somehow on the window exit, or does...
2 years ago

JavaScript question

Javascript
It is possible not to show html page in user browser until some JavaScript(built-in or in separate file) will be loaded and executed(for page DOM mani...
3 years ago

JavaScript quicksort

Javascript
I have been looking around the web for a while and I am wondering if there is a 'stable' defacto implementation of quicksort that is generally used? ...
3 years ago

JavaScript exponents

Javascript
How do you do exponents in JavaScript? Like how would you do 12^2?
3 years ago

JavaScript: getElementsByTagName()

HTML
i need to select all items with <a></a> tag in my page and add them a class with classList i've tried with getElementsByTagName('A')and th...
3 years ago

Javascript Objects?

Javascript
I have two Question which I am uncertain of. What happens and what are the rules when using this piece of coding: var c = "Test"; ...
3 years ago

Javascript HMACSHA1

Javascript
Deleting the question as it was inappropriate here. ThanKs all.
3 years ago

JavaScript - Closures

Javascript
I'm reading the explanation of closures on Mozilla developer site and am struggling a bit. Please have a look at the following code from Mozilla websi...
2 years ago

Javascript closure

Javascript
The following program returns "local" and, according to the tutorial Im reading, it is designed to demonstrate the phenomenon ofclosure` What I don`t...
2 years ago

JavaScript Prototypes

Javascript
Why in MDN functions polyfills use "if (!Array.prototype.filter)" ? if (!Array.prototype.filter) { Array.prototype.filter = function(fun/*, thisA...
2 years ago

Javascript tables

Javascript
I'm having an issue with looping through a table in Javascript and getting the text from the first cell of a row. I want to get the text of this cell ...
3 years ago

JavaScript CRC32

Javascript
I'm looking for a modern JavaScript implementation of CRC32. This implementation, which may have originated from here, and is now here, there and eve...
3 years ago

javascript splice

Javascript
I have an array MyArray and I want to remove one element at position i. I tried: MyArray = MyArray.splice(i, 1); but it's returning the element I...
2 years ago

JavaScript button?

Javascript
I want to make a button that adds on 0.00142 each time and I've created a simple JavaScript function but it doesn't seem to work? Any help? Thanks! :)...
2 years ago