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
| public static convertirAEntero(texto): number { | |
| if (texto === null) { | |
| return 0; | |
| } | |
| if (texto.length == 0) { | |
| return 0; | |
| } |
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
| public static convertirAEntero(texto): number { | |
| if (texto !== null) { | |
| if (texto.length > 0) { | |
| if (!isNaN(texto)) { | |
| return parseInt(texto); | |
| } else { | |
| return 0; | |
| } | |
| } else { |
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
| try { | |
| abrirArchivo(archivo); | |
| leerArchivo(archivo) | |
| } catch (err) { | |
| console.error(err.message); | |
| } finally { | |
| cerrarArchivo(archivo); | |
| } |
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
| try { | |
| throw new Error('el error'); | |
| } catch (err) { | |
| console.error(err.message); | |
| } finally { | |
| console.error('finally'); | |
| } | |
| // Resultado: | |
| // el error | |
| // finally |
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
| try { | |
| throw new Error('mi error'); | |
| } finally { | |
| console.error('finally'); | |
| } | |
| // resultado: finally |
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
| try { | |
| throw new Error('esto es un error'); | |
| } catch (err) { | |
| console.error(err.message); | |
| } | |
| // resultado: esto es un error |
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
| import { Component } from '@angular/core'; | |
| @Component({ | |
| selector: 'fb-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { | |
| title = 'facebook'; | |
| } |
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
| import { Component } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { | |
| title = 'google'; | |
| } |
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
| { | |
| "name": "google", | |
| "version": "0.0.0", | |
| "scripts": { | |
| "ng": "ng", | |
| "start": "ng serve", | |
| "build": "ng build", | |
| "test": "ng test", | |
| "lint": "ng lint", | |
| "e2e": "ng e2e" |
NewerOlder