Home > Article > Web Front-end > String conversion and JS essay
① ? o : null 0 when it means true, null when flash
②alert means (prompt)
alert is a scripting language used in HTMLDOM. It is a common method of window object in JavaScript scripting language; its main usage is the language of the dialog box that pops up by performing corresponding operations after you define a certain function yourself. And the alert dialog box is usually used to provide some prompt information to the user.
③String conversion
Javascript string conversion method
Boolean(value)——Convert the given value into Boolean type
Number(value)——Convert the given value into a number (can be an integer or float Points)
String(value) - Convert the given value into a string
[Note] Using one of these three functions to convert the value will create a new value to store the value directly converted from the original value.
④return is the keyword for function return value in JavaScript
The result processed within a function can be returned using return, so that the variable can be used to receive the returned
result where the function is called. Any type of variable data or expression within the return keyword can be returned, or even nothing can be returned