Imágenes de alternancia de JavaScript

function swap(X)
     {
     if ( X.src == "images/icone/RECORD_1.svg" )
          X.src = "images/icone/RECORD_0.svg" ;
     else
          X.src = "images/icone/RECORD_1.svg" ;
     }
  
<img src="images/icone/RECORD_1.svg" onclick="swap(this)">
Curious Curlew