adding a score counting to my javascript

adding a score counting to my javascript

Hi there,

I am trying to add some sort of score system to my script, but I have no idea how to get this working. I have two files 1php and 1 javascript (which gets implemented in the php file)

What do I need?
I want to add a score system to my script.

In the javascript there is this part of code:
  1. function foundMatchingBlocks(event, params){
  2. var $elements = params.elements;
  3. $elements.remove();
This removes 2 blocks from a board. When this happens I want to ad +100 points to my score and show this updated score in my php file. (every time 2 blocks get removed it must update the score)

But how to do this? Score starts with 0 ofcourse. I think its very easy to put this in, but I was unsuccesfull

Kind regards,