%%js
// Step 1: Create an object variable
let student = {
studentName: "Aditya Srivastava",
age: 14,
isStudent: true
};
// Step 2: Create variables for favorite song and artist
let favoriteSong = "TP";
let songArtist = "Kapp";
// Create a function that logs the favorite song playing
function playFavoriteSong() {
console.log(`Now playing ${favoriteSong} by ${songArtist}`);
}
// Step 3: Display information about the student
console.log(`My name is ${student.studentName}, I am ${student.age} years old, and it is ${student.isStudent} that I am a student.`);
// Call the function to display the song information
playFavoriteSong();
<IPython.core.display.Javascript object>