kotlin android intent pass data

//Send value from HomeActivity

val intent = Intent([email protected],ProfileActivity::class.java)
intent.putExtra("Username","John Doe")
startActivity(intent)

//Get values in ProfileActivity

val profileName=intent.getStringExtra("Username")