contact saving result is not showing in javscript
<p>I wrote a phone number saver in JavaScript. Everything is working, but when I search a name or a number in the search box no result is being shown:</p>

<pre><code>function contact() {
    var nam1=prompt("Please enter the name");
    var num1=prompt("please enter the phone number");
}

contact();

function search() {
    var searc= prompt("Please enter the name of your contact or phone number");
}

search();

//search box

if ( searc == nam1 ) {
    alert("The phone Number is , " + num1);
}

if ( searc == num1 ) {
    alert("The Contact Name is , " + nam1);
}
</code></pre>
