Javascript Memory

HTML
I was wondering why my program crashes after its made its first match....any ideas would be greatly appreciated. Below is the code snippet. Thanks for...
1 year ago

Regex Javascript?

Javascript
I'm trying to write regular expression that allows alpha characters, space, dash, apostrophe and length 50. So far I have this: /^([A-Za-z\s].{1,50})...
1 year ago

Javascript prototype

Javascript
Using a constructor function and a prototype, I want the Grade function to output a number grade into a letter grade. function Grade(name, grade) ...
2 years ago

javascript domready?

Javascript
I know I can use different frameworks like prototype or jquery to attach a function to the window.onload, but's not what I'm looking for. I need some...
2 years ago

Javascript Recursion?

Javascript
I am practicing recursion. Conceptually I understand how this should work, (see below) but my code isn't working. Please tell me what I am doing wro...
2 years ago

JavaScript session?

Javascript
How do you make a JavaScript session? if (gameWin) { Session["BrugerTid"] = document.all("counter").innerHTML; window.location = "Won.aspx"; ...
1 year 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...
1 year 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...
1 year ago

JavaScript addEventListener

Javascript
He Stackoverflow, Question is simple, If the window size is smaller than width 960px i can click a menu button. When i click it the nav height will b...
1 year ago

JavaScript Permutations

Javascript
I am trying to count the number of permutations that do not contain consecutive letters. My code passes tests like 'aabb' (answer:8) and 'aab' (answer...
1 year ago

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...
1 year 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 ...
1 year 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...
1 year 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...
1 year 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...
10 months ago

JavaScript - assert?

Javascript
What does assert mean in javascript? I've seen something like: assert(function1() && function2() && function3(), "some text"); And...
2 years ago

Javascript recursive

Javascript
i have this problem i want to create a recursive function for calculate all possibilities to have a number (k>0), with the addition of number 1 or 2. ...
2 years ago

Javascript Reflection

Javascript
Is there a way to get all methods (private, privileged, or public) of a javascript object from within? Here's the sample object: var Test = function(...
1 year ago

Chat Javascript

CSS
I've made a chat in javascript and now I want to move the send messages on the left side and the received messages on the right, like Facebook or What...
1 year ago

Javascript Averages

Javascript
I am trying to learn Javascript. I've built the following code to find the average from an array of numbers. It works except the last returned value...
1 year ago