How does TP5 use judgment statements in JS?

write the following in body, but not in JS.

Mar.22,2021

<script>
var uid = {$Think.cookie.uid};

if(uid){
    
}
</script>

it is recommended that the configuration of the template be modified to {{}}
< script >
var uid = "{{$Think.cookie.uid}";

if (uid) {

}
< / script >


< H1 > you can store values with hidden fields and use js to get the values of hidden fields. < / H1 >
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3c2d1-446a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3c2d1-446a1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?