I am giving a simple example of jQuery code below:
$(".black").on("click", function() {
$(this).css("color", "red");
});
When an element with 'black' css class is clicked, the particular element's (this) color turns to red.
Now, how the above code can be written in pure JavaScript? Please tell me the JavaScript equivalent of Jquery $(this) when it is used against a class selector.