javascript
-
12 extremely useful tips that every JavaScript programmer should know
- April 4, 2017
- Posted by: admin
- Category: Coding
No Comments1. Convert data type to boolean using operator !! Sometimes we need to check if some variable exists or if it has a valid value. To confirm such, you can use !!(double negative operator). It will automatically convert all data types of variables boolean and will return falseonly if it has the same value as:
[vc_row css=”.vc_custom_1452662185213{margin-bottom: 40px !important;}”][vc_column][vc_wp_search][vc_wp_categories title=”categories”][/vc_column][/vc_row][vc_row css=”.vc_custom_1452662201783{margin-right: 0px !important;margin-bottom: 40px !important;margin-left: 0px !important;}” el_class=”third_bg_color”][vc_column css=”.vc_custom_1452056633692{padding-top: 37px !important;padding-right: 30px !important;padding-bottom: 40px !important;padding-left: 30px !important;}”][vc_custom_heading text=”how can we help you?” font_container=”tag:div|font_size:16px|text_align:left|color:%23222222″ google_fonts=”font_family:Poppins%3A300%2Cregular%2C500%2C600%2C700|font_style:600%20semi-bold%3A600%3Anormal” css=”.vc_custom_1451998719729{margin-bottom: 9px !important;}”][vc_column_text css=”.vc_custom_1520834366002{margin-bottom: 17px !important;}”]Contact us or submit a business inquiry online.[/vc_column_text][vc_btn title=”contacts” style=”flat” color=”white” size=”sm” i_icon_fontawesome=”fa fa-phone-square” add_icon=”true” link=”url:http%3A%2F%2Fgraphenelive.in%2Fcontact%2F|||”][/vc_column][/vc_row][vc_row][vc_column][vc_wp_archives title=”archive” options=”dropdown”][vc_wp_tagcloud title=”tags” taxonomy=”post_tag”][/vc_column][/vc_row]