Lightning Components are not just static markup; they interact with Salesforce data to send data back and forth between a browser and Salesforce servers.
JavaScript is used in web applications to add interactivity to web pages. It allows you to manipulate DOM elements (by applying new styles, removing styles, changing HTML markup), communicate with the server to send data back and forth, or pass data to the server, add animations, add visual effects, add audio effects, and many other things.
A Lightning Component bundle comprises JavaScript controllers and helpers that allow you to write client-side JavaScript to add interactivity and retrieve and push data to Salesforce servers.
When you create a Lightning bundle, let's assume that the name of the component is YouTube Search component, a JavaScript controller file is created with...