Js assignment problem

function k(v){
    let s = "";
    if(v !== "") {
        s = v;
    } else {
        v = s;
    }
    
    console.log(s); // 2
    
    k("");

}
k(2);

how to output 2

after that
Oct.12,2021

    {
      let s = '';  //
      function k(v) {
        if (v !== '') {
          s = v;
        } else {
          v = s;
        }

        console.log(s); 

        k('');

      }
    }

    k(2);

function k(v){
    let s = '';
    if(v !== '') {
        s = v;
    } else {
        v = s;
    }
    
    console.log(s); // 2
    
    k('');

}

k (2); execute the function

here

the value executed to internal v is 2% s =';
executes assignment: s = 2;
executes function k ('');
executes value to internal v is also'';
executes assignment v = s v and s are both'';
recursive loop v = s v and s are both';


let arr = [];

function k(v) {
    arr.push(v);
    let s = '';
    if (arr[0] !== '') {

        s = arr[0];
    } else {
        arr[0] = s;
    }

    console.log(s); // 2

    k('');

}
k(2);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b33ed0-2b71e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b33ed0-2b71e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?