This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function sendMail( | |
required string fromAddress, | |
required string toAddresses, | |
required string subject, | |
required string content, | |
numeric priority = 1, // urgent | |
string ccAddresses, | |
string bccAddresses, | |
array attachments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function printMe( | |
required string name | |
) output="true" { | |
writeOutput("<h1>#name#</h1>") | |
return; | |
} | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function printMe() { | |
return arguments?.name; | |
} | |
dump(printMe()) | |
dump(printMe(name = 'Bharat Patel')) | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
variables.heroes = "Nick Fury, Iron Man, Vision, Caption America, Thor"; | |
variables.heroes.each(function(hero, index, list){ | |
writeOutput(index & '. ' & hero); | |
writeOutput('<br />'); | |
}); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
variables.heroQuery = queryNew( | |
'name,movies', | |
'varchar,varchar', | |
[ | |
{ | |
'name': 'Iron Man', | |
'movies': 'Iron Man,Iron Man 2,Iron Man 3' | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
variables.hero = { | |
'name': 'Iron Man', | |
'movies': ['Iron Man','Iron Man 2','The Avengers','Iron Man 3','Avengers: Age of Ultron','Captain America: Civil War','Spider-Man: Homecoming','Avengers: Infinity War','Avengers: Endgame'] | |
}; | |
variables.hero.each(function(key, value, struct){ | |
writeDump(arguments); | |
}); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
variables.heroes = [ | |
{ | |
'name': 'Iron Man', | |
'movies': 11 | |
}, | |
{ | |
'name': 'Captain America', | |
'movies': 7 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
variables.myArr = ["John", "Doe", "Tom"]; | |
loop array="#variables.myArr#" item="variables.ele" { | |
writeOutput(variables.ele) | |
} | |
</cfscript> |