The figures may be a little bit off depending on your browser
Working example:
As you may know I’ve been working on a Prime Number Calculator to get to grips with JavaScript. As you can imagine it has been full of highs and lows, dead ends and overcoming them.
Through making this I’ve learnt a few bits and [...]
Filed under: CSS, How to, JavaScript by Fred
No Comments »
Ever wondered how to remove that comma from the end of a list? I have, and after googling it I found my answer.
Don’t worry about the confusing list of characters, all will be explained.
Here’s the finished code:
Be careful when copying and pasting
var stringName = "a,b,c,d,";
stringName = stringName.replace(/\,$/,‘.’);
alert(stringName);
But you don’t understand that right? I didn’t. Let [...]
Filed under: How to, JavaScript by Fred
3 Comments »