Home > Web Front-end > JS Tutorial > String conversion and JS essay

String conversion and JS essay

巴扎黑
Release: 2016-12-19 14:28:40
Original
1166 people have browsed it

① ? 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

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template