Devtools Tech Logo
0
0
0

Can you identify the behaviour of following code snippet? | JavaScript Output Questions | Problem Solving | JavaScript Copy

Option 1
The function duplicates a video post.
It throws an error if the original video post isn’t published.
It prepends “Copy of” to the new video post's title.
Option 2
The function duplicates a video post.
It throws an error if the original video post is published.
It prepends “Copy of” to the new video post's title.
Option 3
The function duplicates a video post and returns the copy.
Option 4
The function duplicates a video post.
It throws an error if the original video post isn’t published.
It prepends “Copy of” to the new video post's title and original video post's title.