Get the App
SLTechnology News&Howtos  ›  Development  › 

An example Analysis of the Operation of b in weakly typed language javascript

Shulou Source: shulou.com Published: 2022-06-03 19:15:01 10月02日 Update

Editor to share with you the weakly typed language javascript in the aforme b operation example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

The details are as follows:

Here are seven small closure functions to test the output of aformab

Test 1: (when an is true,b and false, the output is false)

! function () {var a = true,b = false; console.log ((var b) + 'test1'); / / false test1} ()

Test 2: (when an is true,b and true, the output is true)

! function () {var a = true,b = true; console.log ((var b) + 'test2'); / / true test2} ()

Test 3: (when an is false,b and true, the output is true)

! function () {var a = false,b = true; console.log ((var b) + 'test3'); / / true test3} ()

Test 4: (when an is false,b and false, the output is true)

! function () {var a = false,b = false; console.log ((var b) + 'test4'); / / false test4} ()

Test 5: (when an is false,b, the string is output)

! function () {var a = false,b = ''; console.log ((AMaginb) +' test5'); / / test5} ()

Test 6: (when an is a string and b is false, the output is false)

! function () {var a = '',b = false; console.log ((var b) +' test6'); / / false test6} ()

Test 7: (when an is true,b and empty string, the output is empty string)

! function () {var a = true,b =''; console.log ((AMagneb) + 'test7'); / / test7} (). The above is all the contents of this article entitled "example Analysis of apenb Operation in weakly typed language javascript". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Test output time character string article example type language analysis operation content empty character not much function most more knowledge result industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker Redmi vpn macOS