Disable right click on HTML5 video

Question: I need to deactivate the functionality which occurs when you right click on a video. It gives you the option to ‘download video’ I need to turn this off for copyright reasons. I know there are always ways and means to download video content if you want it badly enough, but having a download […]

Read More

How to break out of the forEach in JavaScript

Array.prototype.forEach forEach is such an useful method. Example: Output: It’s still iterating through all items in the array. What should I do if I want to stop the loop based on the condition? It’s simple: Don’t use forEach. Use some or every. Array.prototype.some some is pretty much the same as forEach but it break when […]

Read More