javascript - console output does not appear in code wars -


i'm doing javascript exercises on code wars. want see what's going wrong in programs printing console, nothing except test results appears in output window. know how print console in code wars? can't find in documentation.

function areyouplayingbanjo(name) {   // implement me   var person = name.split('');   person[0].tolowercase();   console.log(person[0]);   if(person[0] === 'r'){     return name + " plays banjo";   }   else{     return name + " not play banjo";   } } 

see issue: http://www.codewars.com/users/elistan/comments https://codewars.com/users/isbadawi/replies

from coding point of view first store lower case value compare:you need this:

function areyouplayingbanjo(name) {       // implement me       var person = name.split('');       console.log(person);      var x= person[0].tolowercase();       console.log(person[0],x);// see difference here       if(x === 'r'){// if use person[0] not match given input because r         return name + " plays banjo";       }       else{         return name + " not play banjo";       }     }  var out = areyouplayingbanjo('rikke, rikke , martin');     console.log(out); 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -