The difference between == and === and the difference between sass and less in js (fine version)

 

What is the difference between == and === in js

==: The operator is called equality. It is used to detect whether two operands are equal. The definition of equality here is very loose and allows type conversion.
===: Used to detect whether two operands are strictly equal.
1. For zhidaostring , number based and other types, and == === is different within
different types of comparison, the comparison == "into the same type capacitance" see "value" is equal, if different types ===, the result is unequal
same type of comparison, direct "value" more, both as the result of
2, for Array, Object and other senior types, == and === is no difference between the
3 basic types of advanced type, == It is different from ===.
For ==, convert the advanced to the basic type, and compare the "value", because the type is different, === the result is false

The difference between sass and less (refined version)

First, understand the difference between them before, at first understand what is sass, what is less
Sass and less dynamic style is a kind of language, of the css gives some dynamic language features, such as variables, inheritance, operations, functions, etc.
Second, they The differences are roughly as follows:
1. The compilation environment is different:
the installation of sass requires the Ruby environment, which is processed on the server side, and Less needs to introduce less.js to process Less code output css to the browser, also You can use Less in the development process, then compile it into a css file and put it directly in the project.
2. Variable characters are different:
Less is @, and Scss is $
3. Output settings
Sass provides 4 output options: nested, compact, compressed and expanded.
4. Sass supports conditional statements, you can use if {} else {}, for {} loop and so on. Less does not support it.
5. references external CSS file
external file references scss name must begin with, if the file name with an underscore at the beginning, then, Sass considers the file is a reference file, it will not be compiled into css file.
6.Sass tools and Less Different libraries
Sass has a tool library Compass
Less has a UI component library Bootstrap

Guess you like

Origin www.cnblogs.com/hongdoudou/p/12683766.html