Js Snippets
Text shortner function with js that end with ‘…’
You want a JavaScript function that shortens text and adds an ellipsis ("...") to the end. Here's a simple function that does that:
...
Question: how to know the count of every character in string
Some times your interviewer ask you that count the every character in the string
const str = "how are you";
const objt = {}
for(let ...