Ok, I have an array of dates and I want to filter out to unique dates. Example: [12.03.2018, 12.03.2018, 14.03.2018, 14.03.2018, 15.03.2018], and I want this output [12.03.2018, 14.03.2018, 15.03.2018]. Does that make sense? I'm preeeetty sure they are Date objects
I have just started to learn JS 4 real, and I started up by extending the HTMLElement, and I'm apparently NOT supposed to do that. Are there any other alternatives in pure JS?
I'm making a webpage, how can I make it auto reload with SASS? I tried doing it with livereload (but the project seems dead) and livereloadx (but don't how to do it with SASS)
Oh, cool! I'd be sure to check that out! I've made an almost working version of Pong using canvas, but I'd like to do more. I find JS very interesting haha
codepen.io/wostensen/pen/LLVxaL Can someone tell me why my collision function doesn't work properly? Whenever the ball is to the left of paddle, it starts to vibrate
@luggage Well, I read many programming subreddits on Reddit and I constantly see titles or jokes like 'node.js is cancer', 'who thought javascript for backend was good' and so on
As I've understood it, requestAnimationFrame requires a callback and having the callback recursively call it, and I've done that but no error and nothing shows up
This is what I tried to do: ``` HTMLElement.prototype.switchClasses = function(cOne, cTwo) { // Toggle from one to two if(this.classList) { if(this.classList.contains(cOne)) { this.classList.remove(cOne); this.classList.add(cTwo); } } else { console.error("no classlist wtf"); } } ```
I'm doing some homework where I have to take two values from a loop and evalute their equality, but it always leaves out the last item if the list length is not even This is the code: https://gist.github.com/wOstensen/5a786505121fabffcc8e74e987750b4d how can I include the last element of the list as well?