0
What does the exclamation mark (!)represent within a given string of parameters?
function myfunction("Hello Javascript World" + "See you on the next set of coding practice q&a" + " ! ");
2 Antworten
+ 2
As it is in the code you have in your post the argument passed in to myfunction() will be the 3 strings concatenated together. As such: "Hello Javascript WorldSee you on the next set of coding practice q&a ! ", therefore the exclamation point will just act as another character in the string and doesn't represent anything other than an exclamation point.
The exclamation point "!", also sometimes referred to as the not or bang operator, does, however, have other uses in most programming languages including JavaScript. It is often used to invert the result of a boolean operation, flipping a true value to a false value or a false value to a true value. This is probably the most common use across most languages although there are some other uses within other languages such as Swift etc.
0
thank you for the prompt response sir, (i forgot to input the curly braces before stating my string parameters.) Cheers!