Skip to content

Instantly share code, notes, and snippets.

# 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
/*(<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);
/*(<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() {
/*(<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!');
}
/*(<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++;
//}