JavaScript search words in string

I am trying to solve this exercise but really it seems impossible.



Write a Javascript function that, given a string and a dictionary of words, determines whether all the words of the dictionary (and only those words) are contained in the string.



Forbidden functions:
String.prototype.indexOf()
String.prototype.charAt()
String.prototype.endsWith()
String.prototype.startWith()
String.prototype.includes()
String.prototype.match()
String.prototype.lastindexOf()
String.prototype.search()
String.prototype.replace()
String.prototype.substring()

EXAMPLE OF GOOD PROVIDER:
string: 'foobarfooba'
dictionary: 'foo', 'bar', 'fooba'

string: 'foobarfoobarbarfooba'
dictionary: 'foo' 'bar' 'fooba'

EXAMPLE OF BAD PROVIDER:
string: 'foobarfoobas'
dictionary: 'foo', 'bar', 'fooba'

string: 'foobarfooba';
dictionary: 'foo', 'bar'