Introduction
In this lab, we will explore how to encode a given string to base64 format using JavaScript. We will create a function that takes in a string, converts it to binary using a buffer, and then returns the base-64 encoded string. This lab aims to help learners understand the process of encoding data in base64 format and how it can be applied in real-world scenarios.