This file contains hidden or 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
# Swift Language Fundamentals | |
Swift is a modern programming language for Apple platforms (iOS, macOS, etc.) with these key characteristics: | |
1. Core Features: | |
- Type inference for automatic type detection | |
- Optionals for safe handling of missing values | |
- Closures for flexible function passing | |
- Memory safety by design | |
- Built-in error handling |
This file contains hidden or 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
/*(<seed> ////write a javascript function to divide two numbers and then multiply the resulting number by the divisor. | |
</seed>) | |
<stop>});</stop> | |
<codeType>javascriptBrowser</codeType>*/ | |
// function divide(a, b) { | |
// return a / b; | |
// } | |
// console.log(divide(10, 2) * 3); |
This file contains hidden or 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
/*(<seed> //write a nodejs javascript function to count to a number between 34 and 98 and say Hello World. | |
//but try to avoid this error: Unexpected end of input | |
</seed>) | |
<stop>});</stop> | |
<codeType>javascriptServer</codeType>*/ | |
//var count = 34; | |
// | |
//function sayHello() { |
This file contains hidden or 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
/*(<seed> ////write a javascript function to say Hello World!.. | |
//but try to avoid this error: Unexpected identifier | |
</seed>) | |
<stop>});</stop> | |
<codeType>unknown</codeType>*/ | |
function sayHelloWorld() { | |
console.log('hello world!'); | |
} |
This file contains hidden or 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
/*(<seed> //write a nodejs javascript function to count to a number between 34 and 98 and say Hello World. | |
</seed>) | |
<stop>});</stop> | |
<codeType>python</codeType>*/ | |
// | |
//var count = 34; | |
//while(count <= 98) { | |
// console.log(count); | |
// count++; | |
//} |