how to erase text
              in 
             Programming Questions 
              •  
              10 months ago    
            
 
           hello,
how can i erase the text by using Backspace key.
This is not working
- if (keyPressed) {
- if (key != '\n' && key != CODED) {
- if (typing.length() < 10){
- typing = typing + key;
- }
- }
- if (key == BACKSPACE) {
- if (typing.length() > 0) {
- typing = typing.substring(0, typing.length()-1);
- }
- }
- }
- text(typing, 345, 372);
 
              
              1  
            
 
            
 
 
           
 
            