used for loop and forEach loop to console.log messages of arrays.