We can use ?: instead of if else also in javascript. Here a example.
var str= 'C:\\fakepath\\'; document.getElementById('fakeFileTxt').value = (this.value.match(/fakepath/))? this.value : str.concat(this.value)
0 Comments