0
Why it dosent work?[Solved]
4 Respuestas
+ 2
Line 3:
You iterated <frequency> which is a function where you ahould be iterating the <phrase> atring argument.
+ 1
Ipang it worked but another problem occured it returns object object
+ 1
Yes, we need to serialize an object to have it displayed in string form properly.
console.log( JSON.stringify( letter_frequency( "hello" ) ) );
Reference:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
+ 1
Ipang thanks it worked i was dying to get this function to work