Given a string s and a character c, return the number of occurrences of c in s.
- Clone this repository:
git clone https://github.com/jonathangomz-courses/counting-chars.git
cd counting-chars
- Write your code on
exercise.js
// example
function sum (a, b) {
return a + b;
}
(function() {
console.log(sum(1, 2));
})();
module.exports = sum;
- Run your code:
npm start
*Optional for testing (Jest)
- Install dependencies:
npm install
- Run jest:
npm test