Intro App
Solidify your knowledge of Props and States by solving this problem.
Krishna is working on a greet application. He is stuck in the middle of the greet application. He is not able to parse the props and construct the following message: Hello, my name is ${name} and I am ${age} years old.
inside a p
tag.
Props is passed as data
object with name
& age
as key.
If no data is passed, the component should have default data props
as {name: 'Dev11', age: 1}
.
Solve this easy problem to earn 1