I need to make a border appear and disappear whenever I click. I can not use jQuery or eventlist. I know I should use IF but I do not know how. What I get so far is to click and make it appear. Must be around the paragraphs. I appreciate your help
var elements = document.getElementsByTagName("p");
for (var i = 0; i < elements.length; i++){
elements[i].onclick=function(){
this.style.border="dashed black 1px";
}
}