Shortest way to print current year in a website

ears later, when doing something else I was reminded that Date() (without new) returns a string, and a way that’s one character shorter that my original below came to me: The first sequence of four digits in the string from Date() is specified to be the year. (That wasn’t specified behavior — though it was common — … Read more

Why is the jquery script not working?

Samuel Liew is right. sometimes jquery conflict with the other jqueries. to solve this problem you need to put them in such a order that they may not conflict with each other. do one thing: open your application in google chrome and inspect bottom right corner with red marked errors. which kind of error that … Read more

JS file gets a net::ERR_ABORTED 404 (Not Found)

As mentionned in comments: you need a way to send your static files to the client. This can be achieved with a reverse proxy like Nginx, or simply using express.static(). Put all your “static” (css, js, images) files in a folder dedicated to it, different from where you put your “views” (html files in your … Read more

React.js – Can’t read property of undefined

The actual problem here is that the this context is not defined in your handleChangeOnMonth function. This is caused because of the way that javascript handles the contexts of functions, basically when calling functions if you are not calling them directly from the object, and they are not bound they will not have a defined … Read more