No of Occurrence of Each String in the Array , using javascript [duplicate]

Map Filter Object Method For Foreach

i have an array like
let Input = ["jack","And","jack", "jill","jack","jill"]

No of Occurrence of Each String in the Array
use only
Map Filter Object Method For Foreach
Key : Val

i need an output as

output: ["jack": 3, "jill": 2,’And’:1]