how can i add value in different variable after clicking + in javascript : document.querySelector('.buttons').addEventListener('click',function(e) {
 var targetElement = event.target || event.srcElement;

	var selectednumber=targetElement.dataset.number;
	var element = document.getElementById('display');
		element.value +=selectednumber;

			oldvalue=element.value;

		console.log("in old :"+ oldvalue);
	 if(targetElement.dataset.number==='+'){
	 	//after click of +

      var element=document.getElementById('display');
    		 

		newvalue=oldvalue;


		console.log("i ma new "+newvalue);
		console.log(newvalue);

	}

	if (targetElement.dataset.number==="=") {

			sum=oldvalue+newvalue;
	
		
