Replacing print( ) with console.log( ) in codes for exercise 2.4