Home
Javascript Fundamentals
# Javascript basics
# Javascript arrays
# Javascript objects
# Javascript dates
# Javascript Sets
Javascript DOM
# DOM selector methods
# Events and user interactions
# DOM manipulation
# DOM fundamentals
# Recursive functions
Challenge Rush
Random Challenge
// Write a function that takes two strings (a and b) as arguments// Return the number of times a occurs in b function myFunction ( a, b ) { return }
return
myFunction('m', 'how many times does the character occur in this sentence?')
2
myFunction('h', 'how many times does the character occur in this sentence?')
4
myFunction('?', 'how many times does the character occur in this sentence?')
1
myFunction('z', 'how many times does the character occur in this sentence?')
0