javascript - React - > What do you call the message wrapped in curly braces below? - Stack Overflow

could you please help with finding the right answer for the quiz question:What do you call the message

could you please help with finding the right answer for the quiz question:

What do you call the message wrapped in curly braces below?

let message = "Hi there"; 
const element = <p>{message}</p>

a. JS function

b. JS element

c. JS expression

d. JSX wrapper

Is the right answer "JSX wrapper" or "JS expression" reference link from the official docs .html

could you please help with finding the right answer for the quiz question:

What do you call the message wrapped in curly braces below?

let message = "Hi there"; 
const element = <p>{message}</p>

a. JS function

b. JS element

c. JS expression

d. JSX wrapper

Is the right answer "JSX wrapper" or "JS expression" reference link from the official docs https://reactjs/docs/introducing-jsx.html

Share Improve this question asked Aug 10, 2020 at 9:01 Evgenii BazhanovEvgenii Bazhanov 9261 gold badge7 silver badges20 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

That's just a JS Expression wrapped in JSX. So, the right answer is c.

You can take reference: JSX is an Expression Too

JSX Wrapper is nothing but JSX Element like we can call wrapper to html element that is root of. So, the JSX wrapper is JS Expression wrapping element. In the example <p /> is what you may call JSX wrapper.

The message wrapped in curly braces below:

let message = "Hi there"; 
const element = <p>{message}</p>

The right answer is: (c.) JS expression

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744195945a4562656.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信